Page MenuHomePhabricator

PrefixSearch (ApiOpenSearch) should supports searching in multiple namespaces
Closed, DuplicatePublic


The function defaultSearchBackend() in PrefixSearch.php is supporting only one namespace among all the namespaces specified for the search.

This behavior has been corrected but the fix has been reverted in 2014.

According to ebernhardson, it « looks like the single namespace restriction was put in place in 2008 [...] at the time it looks like the custom lucene search engine that was being used couldn't support it ».

This problem is notably affecting the autocomplete search functionnality.

Event Timeline

Anomie added a project: MediaWiki-Search.
Anomie added a subscriber: Anomie.

The API supports multiple namespaces. It's the underlying search code that needs fixing to not ignore all but the first.

This looks like what is doing, but there are some open questions:

  • If Special: is one of these namespaces, do we mix the results?
  • In general, how results are mixed between namespaces? One-NS search may have specific order that is important, but if there are two namespaces, how results are ordered between them?
Smalyshev added a subscriber: Smalyshev.