Page MenuHomePhabricator

Search with prefix does not work
Closed, ResolvedPublic

Description

Searching with prefix doesn't work on ca.wiki:
https://ca.wikipedia.org/wiki/Special:Search?search=Foo&prefix=List&fulltext=Search
searches for "Foo" in all pages instead of "Foo prefix:List". Checked also in test.wikidata.org, both projects with extension CirrusSearch. This affects the behaviour of inputbox with parameter prefix, widely used for searching in archives, i.e. the local Village Pump https://ca.wikipedia.org/wiki/Viquip%C3%A8dia:La_taverna


Version: unspecified
Severity: normal

Details

Reference
bz55408

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:12 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz55408.

As a short term solution I have recommeded vriullop to use the parameter "&srbackend=LuceneSearch"as a way to retrieve the results from MWsearch, which is still installed in ca.wikipedia.org.

https://ca.wikipedia.org/wiki/Viquip%C3%A8dia:La_taverna/Ajuda#Cerca_amb_prefix

I have learned this parameter from Chad since I couldn't find it documented. <collateral comment>In general I'm missing a page for CirrusSearch user documentation. Does it exist?</collateral comment>

Oh, sorry. My advice to vriullop won't work. The search he is referring to is done using [[mw:Extension:InputBox]] and therefore the parameters can't be modified by editors.

It looks like I implemented something totally different when I build the prefix: filter. I'm fixing this to work just like the documentation on https://en.wikipedia.org/wiki/Help:Searching

Change 88209 had a related patch set uploaded by Manybubbles:
Replace prefix: implementation.

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

Change 88210 had a related patch set uploaded by Manybubbles:
Tests for proper prefix: implementation.

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

Change 88210 merged by jenkins-bot:
Tests for proper prefix: implementation.

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

Change 88209 merged by jenkins-bot:
Replace prefix: implementation.

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

Ouch, sorry, I hadn't reported it because I couldn't find what was the exact syntax for prefix: in Cirrus so I thought I maybe was just using the wrong one.

With Lucene, it was important to 1) not to use underscore or anything in the title, but just quote it literally, 2) not have a space between "prefix:" and the title. Is this reimplementation like that or more flexible?