Topic on Extension talk:InputBox

Paramater prefix doesn't work

8
Loman87 (talkcontribs)

Hi everybody, I want to use the parameter 'prefix=' in my InputBox 'type=fulltext' to limit search within a specific category. I use CirrusSearch as search engine, so it supports queries like 'incategory:[CategoryName]'. So in my Inputbox I would use something like 'prefix=incategory:[CategoryName]'. I tried but in the query results I see it has been searched something like '[wordQueried] prefix:incategory:[CategoryName]'.

I have read in InputBox documentation that this feature was supported just by Lucene; is there any chance to see it working also with other search engines? I think it could be an intersting upgrade for InputBox users. Thanks for your help! Lorenzo

Quiddity (WMF) (talkcontribs)

Hi. The "prefix" parameter is just for finding "pages that start with a specific string their name", so won't work for your purpose here.

I think the "default" parameter might be the closest to what you want. Your users will need to (1) Leave the 'default' as it appears, and (2) add a space after the default. But it will work, as long as you use underscores for multi-word category names. E.g. see this revision. Hope that helps.

Loman87 (talkcontribs)

Hi, thanks for your answer. Yes, the other option is to use the parameter 'default' but I don't like it very much. Is it possible to add this feature for future updates? Thanks, Lorenzo

Quiddity (WMF) (talkcontribs)

I've added a comment at the existing feature-request, Phab:T147951. I'm not sure if any developers are actively working on this extension currently, so patches welcome if you know how to code! Otherwise, it may take a long time.

Loman87 (talkcontribs)

Thanks very much! Unfortunately I am not an actual developer, however I am going to study the source to understand what could be done. Bye!

Quiddity (WMF) (talkcontribs)
Loman87 (talkcontribs)

Thanks for the update! This works just for the Mediawiki 1.28 release?

Quiddity (WMF) (talkcontribs)

Sadly not. This is for the 1.30+ update only, per the documentation diff link.

Reply to "Paramater prefix doesn't work"