Last modified: 2010-05-15 16:02:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13482 - Api search returns empty page with MWSearch extension when srsearch=title
Api search returns empty page with MWSearch extension when srsearch=title
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.13.x
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://commons.wikimedia.org/w/api.ph...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-22 20:55 UTC by Bryan Tong Minh
Modified: 2010-05-15 16:02 UTC (History)
0 users

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


Attachments

Description Bryan Tong Minh 2008-03-22 20:55:49 UTC
Api search returns empty page with MWSearch extension. See <http://commons.wikimedia.org/w/api.php?action=query&list=search&srsearch=meaning>.
Comment 1 MER-C 2008-03-23 02:25:43 UTC
It appears the bug only applies to searches with the parameter srsearch=title which is the default for this parameter.

Working: http://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=text&srsearch=meaning
Not working: http://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=title&srsearch=meaning

Bumped severity to major.
Comment 2 Bryan Tong Minh 2008-03-23 13:01:01 UTC
That clarifies a lot. See this code in the MWSearch extension:

        // this stuff's a little broken atm
        global $wgLuceneDisableTitleMatches;
        if( $wgLuceneDisableTitleMatches ) {
            return null;
        } else {
            return LuceneSearchSet::newFromQuery( 'titlematch',
                $term, $this->namespaces, $this->limit, $this->offset );
        }

Apparently a search can return null sometimes. The question is what to do when null is returned. Should we raise an error or silently fail and return an empty list?
Comment 3 Bryan Tong Minh 2008-03-23 13:17:42 UTC
Fixed in r32349. Will raise a search-text-disabled or search-title-disabled when either search type is disabled.
Comment 4 Brion Vibber 2008-03-24 19:24:36 UTC
Note that the split between title and text searching will probably go away entirely soon.

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


Navigation
Links