This is a static dump of issues in the old "Flyspray" bugtracker for DokuWiki. Bugs and feature requests
are now tracked at the issue tracker at Github.
This task was never closed in our old bug tracker.
Feel free to open a new task at Github if you feel this is still relevant.
FS#2224 Don't allow search on 1 or 2 letter words
Searching a wiki can be stressfull for the servers. Actually we can make searches with 1+ letter words.
Try it, the results are useless, and the time response is big. And if you add a wildcard it's worse.
So it should be a good idea to limit the searches and don't allow search on 1 or 2 letter words (or more restrictive?). We can also put a configurable limit like in forums.
Your idea is to allow only search with words with size greater than what? 3?
I would prefer a config option where the administrator can set the minimum length of the searchstring.
3 is a good start, but a configurable minimum lenght is better I think like lupo49 wrote and let people limit or not the searches.
Shouldn't that limit be the same as the limit in the indexer? There is a constant IDX_MINWORDLENGTH which is per default 2 and used for non-numeric tokens. For shorter words the index doesn't contain any information anyway and thus the search only returns matches from the pagename/title search. I don't know why searching for shorter words should take longer than searching for other, very frequent long words. Thus I would say if you are concerned about shorter words setting IDX_MINWORDLENGTH would be the best option (e.g. using inc/preload.php) - and then there should be some error message that searching for words shorter than that limit doesn't work.