Page MenuHomePhabricator

Search engine should treat namespace prefixes properly
Closed, ResolvedPublic

Description

Author: beland

Description:
1.) Strings that are clearly namespace prefixes should be interpreted as
namespace prefixes.

For example, if I type "Category:Dead people" into the navbar on the left-hand
side of any Wikipedia page and hit "Search", I do not find "Category:Dead
people" in the results. Instead of searching the Category namespace for "Dead"
and "people", it has searched the main namespace and, inexplicably, the
Mediawiki talk: namespace for "Category:Dead" and "people".

2.) Namespace flags, when set, should be honored for the entire page.

There are two text entry bars on the search page, one near the top and one near
the button, each with their own submit buttons. Only the bottom bar seems to
respect the namespace flags. For example, if I select "Category" and deselect
(Main) and Mediawiki talk:, then type "Dead" in the top search bar and hit the
"Search" button next to it, the search engine looks in the main namespace for
the query "Dead", not the category namespace. However, if I do the same thing
but use the bottom bar instead, I successfully find "Category:Dead people" among
the results.


Version: unspecified
Severity: enhancement
OS: Linux
Platform: PC

Details

Reference
bz1942

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:22 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz1942.
bzimport added a subscriber: Unknown Object (MLST).

Could you split this into two bug reports, please?

beland wrote:

Sure. This bug will be about (1); (2) has been re-reported as 1953.

rainman wrote:

Fixed in Lucene Search 2. Namespace prefixes are treated as filters. So, query:
category:dead people, will search the category namespace for "dead people".