Page MenuHomePhabricator

ApiOpensearch unable to search for pages in namespace starting with lower case letter
Closed, ResolvedPublic

Description

How to reproduce:

  1. Add settings:

$wgCapitalLinkOverrides[NS_FOO] = false; // NS_FOO 1200
$wgCapitalLinkOverrides[NS_FOO_TALK] = false;

  1. Create Foo:bar
  1. Go to /w/api.php?action=opensearch&format=jsonfm&namespace=1200&suggest=&search=bar

Expected: To get suggestion for Foo:bar
Observed: No suggestions
Reason: There is some code in PrefixSearch::search that normalizes the search keyword as if it were in NS_MAIN.


Version: 1.24rc

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:22 AM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz65752.

Not an API bug, the API is just returning what PrefixSearch::search gives it.

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

Patch awaiting review for two months...

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

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

debt added a subscriber: debt.

This looks like it might have been fixed...removing the Discovery Search tags. Please let us know if we need to do anything else.

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

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