Last modified: 2014-10-21 14:08:06 UTC
There should be the ability to restrict search to a given page and its subpages. For example, I want to restrict search to the page https://en.wikiversity.org/wiki/Automatic_transformation_of_XML_namespaces and its subpages like https://en.wikiversity.org/wiki/Automatic_transformation_of_XML_namespaces/Draft_status This make the ability to do search in an individual "book".
You can already, utilise the prefix component as described on the search help. Have a look at how we have a template at English Wikisource to manage this directly https://en.wikisource.org/wiki/Template:Engine You should be able to import it directly and to have it work, though you probably will want to change the button text. And if you don't have transwiki import set up from enWS, then try meta or mediawiki, as I migrated it to those wikis too. Note. If you want to only do subpages, you just need to add a "/" at the end to force it to only look at subpages.
The search help page is at [[mw:Help:CirrusSearch]] and you should look at the "prefix:" component, and think usage like for "Special:PrefixIndex"
I want an <input type="text"> where I can easily enter the prefix. The above described features are not enough.
This is already possible with the [[mw:Extension:InputBox]]. See the extension documentation page for more parameters. For example, the following wikitext would produce <https://en.wikiversity.org/w/index.php?oldid=1248385> <inputbox> type=search prefix=Automatic transformation of XML namespaces </inputbox>
or type ... prefix:Automatic_transformation_of_XML_namespaces into a search box, which is only several characters and no need to have a specialised search form, it works anywhere if you know the path