action=query, list=search API not working
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
bzimport
Subscribers
Catrope, wikibugs-l
Projects
Reference
bz10908
Description

Author: bsrour

Description:
When I try and remotely invoke a search query to the Wikipedia API I get back a null set of results.

Ben Srour wrote:

Hello,

I am having trouble calling this url:
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikipedia&srlimit=10

All I get is:
<?xml version="1.0" encoding="utf-8"?>
<api>

<query>
  <search />
</query>

</api>

What's up? Is this not yet implemented, turned off? Any help here
would be really appreciated.

LuceneSearch extension and MWSearch extension need to be merged in an
appropriate way so the API can get access to search results.

  • -- brion vibber (brion @ wikimedia.org)

Version: unspecified
Severity: normal

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz10908.
bzimport created this task.Via LegacyAug 13 2007, 8:03 PM
bzimport added a comment.Via ConduitFeb 4 2008, 2:31 PM

alessandro.larosa wrote:

Any news about this bug?

Catrope added a comment.Via ConduitFeb 4 2008, 3:19 PM

(In reply to comment #1)

Any news about this bug?

Well, no, no one has worked on making Lucene API-friendly AFAIK.

bzimport added a comment.Via ConduitFeb 4 2008, 3:45 PM

alessandro.larosa wrote:

(In reply to comment #2)

Well, no, no one has worked on making Lucene API-friendly AFAIK.

Thanks for the answer Roan.

Anyway, is there any search API alternatives at the moment?

bzimport added a comment.Via ConduitMar 1 2008, 9:21 PM

Bryan.TongMinh wrote:

Initial version of ApiQueryLuceneSearch.php

Attached a first version of my ApiQueryLuceneSearch.php extension module. I do not have Lucene working, so it is untested. Currently only the fulltext search function of Lucene is supported.

Attached: ApiQueryLuceneSearch.php

Catrope added a comment.Via ConduitMar 1 2008, 9:52 PM

Nice work, Bryan, although you can lose Yuri's copyright line in favor of yours (you're the one who wrote the module, after all). You might wanna write up another patch that integrates this into the LuceneSearch extension (add it to $wgAPIModules in LuceneSearch's setup code) and ask someone with Lucene (the TestWiki folks, maybe?) to test it.

bzimport added a comment.Via ConduitMar 2 2008, 9:03 PM

Bryan.TongMinh wrote:

Patch to automatically load ApiQueryLuceneSearch

Attached: LuceneSearch.php.patch

bzimport added a comment.Via ConduitMar 2 2008, 9:48 PM

Bryan.TongMinh wrote:

Added in r31471. Not very thoroughly tested.

bzimport added a comment.Via ConduitMar 3 2008, 3:53 PM

Bryan.TongMinh wrote:

Appears to be working except the part that outputs the titles: See http://commons.wikimedia.org/w/api.php?action=query&list=search&srsearch=sheep&sroffset=10&format=jsonfm. ApiQueryLuceneSearch::formatItem appears to be returning null.

Catrope added a comment.Via ConduitMar 3 2008, 3:55 PM

I can't debug this as I don't have Lucene. It could be that $result->getTitle() (line 81) is null.

bzimport added a comment.Via ConduitMar 3 2008, 9:29 PM

Bryan.TongMinh wrote:

Fixed in r31522.

Aklapper added a comment.Via ConduitMar 26 2013, 11:24 AM

[Merging "MediaWiki extensions/Lucene Search" into "Wikimedia/lucene-search2", see bug 46542. You can filter bugmail for: search-component-merge-20130326 ]

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.