Page MenuHomePhabricator

Allow appending search "filters" to search terms
Closed, ResolvedPublic

Description

Done: You can now add parameters such as searchfilter=insource:foo to the search inputbox - it will append that value to the user's search query. Full documentation at https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:InputBox


Please add cirrus specific parameter to preload the search - inputbox

<inputbox>
type=search
namespaces=Wikipedia
deepcat=Wikipedia:Förderung
insource=Raimund
...(all availible cirrus parametes)
</inputbox>

additional: in some cases the "hidden=" -Parameter for Cirrus-enhanced inputbox could be usefull

Event Timeline

Boshomi created this task.Oct 12 2016, 6:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 12 2016, 6:39 PM
Boshomi updated the task description. (Show Details)Oct 12 2016, 7:00 PM
EBernhardson renamed this task from Add Cirrus Parameters to InbutBox Search to Add Cirrus Parameters to InputBox Search.Oct 12 2016, 7:01 PM

+1. (There's a similar thread at https://www.mediawiki.org/wiki/Topic:Tm0pld07rfuoifsy where the editor is asking for the ability to add "incategory:foo", without having to resort to the "default=" parameter - which can confuse the end-users, and means they have to both avoid deleting it, and add a space afterwards before they can begin typing.)

Harej added a subscriber: Harej.Jun 6 2017, 5:10 PM

I am interested in implementing something like this, but instead of hardcoding every possible CirrusSearch filter into the extension, allow freeform text to append to the search term where the filters could be defined. Such that you'd have searchfilters=incategory:Blah inlanguage: ja etc. This is both easier to implement and would mean we would not have to change the extension whenever CirrusSearch is also changed. Would this approach work for people?

Harej added a comment.Jun 6 2017, 5:38 PM

Upon conferring with @Quiddity I think the best option is to not merge this task with T32404 as that task asks for something a lot more sophisticated than this task.

Change 357437 had a related patch set uploaded (by Harej; owner: Harej):
[mediawiki/extensions/InputBox@master] Allow appending searchfilters to terms

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

Change 357437 merged by jenkins-bot:
[mediawiki/extensions/InputBox@master] Allow appending searchfilters to terms

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

matmarex closed this task as Resolved.Jun 19 2017, 2:41 PM
matmarex removed a project: Patch-For-Review.
matmarex assigned this task to Harej.
matmarex renamed this task from Add Cirrus Parameters to InputBox Search to Allow appending search "filters" to search terms.

I've added docs at https://www.mediawiki.org/w/index.php?title=Extension:InputBox&diff=2493340&oldid=2467274 (please always remember to add docs, for new features! Thanks!)

Quiddity updated the task description. (Show Details)Jun 22 2017, 6:51 PM