Page MenuHomePhabricator

prefix: and insource: do not work at the same time
Closed, DeclinedPublic

Description

When searching for "prefix:Template: insource:nuke" on Commons:

https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=default&search=prefix%3ATemplate%3A+insource%3Anuke&fulltext=Search

it should at least return [[commons:Template:Nuke]] but there are zero hits.


Version: unspecified
Severity: normal

Details

Reference
bz70560

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:42 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz70560.

I'll have a look at this. Does <<Template: insource:nuke>> work for you for now?

(In reply to Nik Everett from comment #1)

Does <<Template: insource:nuke>> work for you for now?

That works, thanks!

Cirrus implements that <<prefix:>> syntax by turning everything that comes after <<prefix:>> into a filter that matches the same stuff that the prefix search in the upper right matches. I'm pretty sure this is what lsearchd did as well. Here is what it spits out:
https://commons.wikimedia.org/w/index.php?title=Special%3ASearch&profile=default&search=prefix%3ATemplate%3A+insource%3Anuke&fulltext=Search&srbackend=LuceneSearch

Indeed; using <<insource:nuke prefix:Template:>> works fine.

That's pretty confusing behavior IMO. Google used to prefix "greedy" keywords with 'all' (allintitle etc.) - something worth considering.

I wouldn't have picked this syntax myself but its how it used to work and one of the goal of CirrusSearch was to preserve backwards compatibility..... Its not that people can't change how they work but there are tools in the wild that depend on this funky behavior.

I'm going to resolve this WONTFIX - its a silly syntax but I'm intentionally not going to fix it to preserve compatibility with whatever might rely on it. Sorry!