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

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 25 2016, 2:21 AM
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.

Restricted Application added a project: Discovery. · View Herald TranscriptFeb 25 2016, 1:06 PM
Smalyshev moved this task from Needs triage to Search on the Discovery board.Feb 25 2016, 9:17 PM

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?
Deskana triaged this task as Low priority.Feb 25 2016, 11:07 PM
Smalyshev removed Smalyshev as the assignee of this task.Mar 20 2017, 11:05 PM
Smalyshev added a subscriber: Smalyshev.
Restricted Application added a project: Discovery-Search. · View Herald TranscriptMar 20 2017, 11:05 PM
Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:43 PM