Last modified: 2013-03-26 11:24:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12908, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10908 - action=query, list=search API not working
action=query, list=search API not working
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
lucene-search-2 (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-13 20:03 UTC by Ben Srour
Modified: 2013-03-26 11:24 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Initial version of ApiQueryLuceneSearch.php (3.87 KB, application/x-httpd-php)
2008-03-01 21:21 UTC, Bryan Tong Minh
Details
Patch to automatically load ApiQueryLuceneSearch (648 bytes, patch)
2008-03-02 21:03 UTC, Bryan Tong Minh
Details

Description Ben Srour 2007-08-13 20:03:49 UTC
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)
Comment 1 Alessandro La Rosa 2008-02-04 14:31:56 UTC
Any news about this bug?
Comment 2 Roan Kattouw 2008-02-04 15:19:25 UTC
(In reply to comment #1)
> Any news about this bug?

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

Comment 3 Alessandro La Rosa 2008-02-04 15:45:41 UTC
(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?
Comment 4 Bryan Tong Minh 2008-03-01 21:21:15 UTC
Created attachment 4686 [details]
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.
Comment 5 Roan Kattouw 2008-03-01 21:52:31 UTC
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.
Comment 6 Bryan Tong Minh 2008-03-02 21:03:09 UTC
Created attachment 4688 [details]
Patch to automatically load ApiQueryLuceneSearch
Comment 7 Bryan Tong Minh 2008-03-02 21:48:42 UTC
Added in r31471. Not very thoroughly tested.
Comment 8 Bryan Tong Minh 2008-03-03 15:53:05 UTC
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.
Comment 9 Roan Kattouw 2008-03-03 15:55:38 UTC
I can't debug this as I don't have Lucene. It could be that $result->getTitle() (line 81) is null.
Comment 10 Bryan Tong Minh 2008-03-03 21:29:50 UTC
Fixed in r31522.
Comment 11 Andre Klapper 2013-03-26 11:24:42 UTC
[Merging "MediaWiki extensions/Lucene Search" into "Wikimedia/lucene-search2", see bug 46542. You can filter bugmail for: search-component-merge-20130326 ]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links