Page MenuHomePhabricator

Bogus "all:" namespace appears in "Did you mean..." when all namespaces selected in preferences
Closed, DeclinedPublic

Description

In the "Did you mean..." suggestion on the search results page, the namespace "All:" sometimes gets prepended to the search term. This bad behavior happens only if the user has checked all of the namespaces checkboxes in My Preferences on the Search tab.

Environment: Lucene 2.1, MWSearch (r45173), MediaWiki 1.15.1.

Test case: search for "Superma"

Correct behavior: "Did you mean: Superman" is displayed

Observed behavior: "Did you mean: All:Superman" is displayed

To make the bug occur, go to My Preferences, click the Search tab, check all namespace checkboxes, and save. To make the bug go away, uncheck ANY namespace checkbox and save.


Version: unspecified
Severity: normal

Details

Reference
bz20766

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:58 PM
bzimport set Reference to bz20766.

If it makes a difference, we have a bunch of custom namespaces defined: 100, 101, and 200-207.

rainman wrote:

This has been fixed some time ago in r50208.

Thanks. I had downloaded the 1.15.x snapshot of MWSearch. I just downloaded from trunk and it works fine.

I spoke too soon: MWSearch trunk doesn't work with MW 1.15.1. "PHP Fatal error: Call to undefined method Language::getNamespaceAliases() in /var/www/html/vistaprint/extensions/MWSearch/MWSearch_body.php on line 94".

rainman wrote:

The trunk is designed to work with latest MediaWiki. You could try reverting r52664 to suppress that error, or get an earlier MWSearch snapshot.

Thanks Robert. The 1.15.x snapshot is buggy (which is the reason for this ticket) so I manually changed "getNamespaceAliases()" to "namespaceAliases" and that cleared up the problem. This ought to hold us until 1.16 is released.

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