I have a simple solution for you. It will mean having to add one line to your template whenever you upgrade.
1. install the searchform plugin
2. create a page named
searchform in your root dokuwiki namespace with the basic searchform plugin syntax:
{searchform}
3. Assuming you are using the current dokuwiki template: open
tpl_header.php and add this line wherever you want the namespace search box to appear:
<?php echo p_wiki_xhtml(':searchform'); ?>
A convenient location is above the Site Tools section.
<?php echo p_wiki_xhtml(':searchform'); ?>
<!-- SITE TOOLS -->
Note, however, that this will give you two search boxes: the namespace box and the default box, which appears in the Site tools section:
<?php tpl_searchform(); ?>
You could, if you want, replace the default with the namespace search, then you would have only one sear box which would always revert to the current namespace. A query made in the root namespace will search the entire wiki, which is the way the searchform plugin works.
Once this is done, unzip the the attached file and place it in the
data/conf directory. It contains a small jQuery function which will insert the current namespace into the searchform request.