Page MenuHomePhabricator

"prefix:" search operator doesn't work for titles that include spaces
Closed, ResolvedPublic

Description

It seems the "prefix:" search operator doesn't deal well with spaces: it uses the correct prefix for the search, but also searches for the words of the prefix in the text of the pages, which yields undesired results.

I tried using underscores (prefix:the_prefix) and quotation marks (prefix:"the prefix"), but both returned no results. Maybe the underscore trick could be used as a workaround. That would also allow using the operator anywhere on the search, not only on the ending. Another option could be enclosing it in parens, i.e. "some search terms (prefix:a page name) more search terms"


Version: unspecified
Severity: normal

Details

Reference
bz24775

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:08 PM
bzimport set Reference to bz24775.

rainman wrote:

Can you please give us the exact queries you used.

I can't remember for sure, but from my edits around the date I submitted this bug ( http://en.wikipedia.org/w/index.php?title=Special:Contributions&offset=20100813100600&limit=7&contribs=user&target=Waldir&namespace=4 ) I'd guess the search was something like "csd a7 prefix:Wikipedia:Village pump (policy)". This however seems to be working properly: http://en.wikipedia.org/wiki/Special:Search/csd_a7_prefix:Wikipedia:Village_pump_%28policy%29 (note that the underscores are only part of the url, not the "trick" I mentioned in my previous comment – which didn't work anyway – and are translated to spaces in the search query).

So I suppose this bug can be closed as WORKSFORME (but it'd be nicer to have the revid that fixed it noted here, and close it as FIXED)

  • This bug has been marked as a duplicate of bug 30125 ***

[Merging "MediaWiki extensions/Lucene Search" into "Wikimedia/lucene-search2", see bug 46542. You can filter bugmail for: search-component-merge-20130326 ]