Page MenuHomePhabricator

PrefixSearch: Add support for multiple namespaces
Closed, ResolvedPublic

Description

ApiOpenSearch takes multiple namespaces, yet, when it comes to the query down in PrefixSearch it calls array_shift() and uses only one namespace.

Looks like something was forgotten to be implemented. Aside from ignoring other namespaces, it also overrides that sometimes (see bug 22773)

Details

Reference
bz30323

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:48 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz30323.
Krinkle created this task.Aug 11 2011, 10:56 AM

rainman wrote:

This was a temporary fix at some point to prevent the mysql backend from dying. Should never be used when using the Lucene backend as it has no problems with multiple prefixes, but should still be in place in case someone uses mysql (i.e. TitleKey).

I've detected that multiple namespaces are ignored in opensearch queries in my wikis (MW 1.16 and MW 1.17), but I've seen that this seems to work in Wikipedia.

Example:

http://en.wikipedia.org/w/api.php?action=opensearch&search=api&limit=100&namespace=0|1&format=jsonfm

Has this been solved in MW 1.19? Or is there any kind of workaround?

Has this been solved in MW 1.19? Or is there any kind of workaround?

Hopefully you'll be able to test this on
http://deployment.wmflabs.org/ today or tomorrow and confirm if
it has been fixed or not.

(In reply to comment #3)

Has this been solved in MW 1.19? Or is there any kind of workaround?

Hopefully you'll be able to test this on
http://deployment.wmflabs.org/ today or tomorrow and confirm if
it has been fixed or not.

Search seems to be still disabled, though :/

You're right, we don't have search up there yet. Hope to get it done today.

  • Bug 35095 has been marked as a duplicate of this bug. ***

Change 136796 had a related patch set uploaded by Nikerabbit:
PrefixSearch (ApiOpenSearch) now supports searching in multiple namespaces

https://gerrit.wikimedia.org/r/136796

Change 136796 merged by Chad:
PrefixSearch (ApiOpenSearch) now supports searching in multiple namespaces

https://gerrit.wikimedia.org/r/136796

Change 141660 had a related patch set uploaded by Nikerabbit:
PrefixSearch (ApiOpenSearch) now supports searching in multiple namespaces

https://gerrit.wikimedia.org/r/141660

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptMay 28 2016, 10:50 PM

Change 141660 had a related patch set uploaded (by Nikerabbit):
PrefixSearch: Implement searching in multiple namespaces

https://gerrit.wikimedia.org/r/141660

Change 141660 merged by jenkins-bot:
PrefixSearch: Implement searching in multiple namespaces

https://gerrit.wikimedia.org/r/141660

Nikerabbit closed this task as Resolved.Sep 17 2016, 1:22 PM
Nikerabbit removed a project: Patch-For-Review.
Nikerabbit updated the task description. (Show Details)