Last modified: 2014-11-20 09:19:51 UTC
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)
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