I would like to establish a minimum number of characters in the search. On sites that have many entries, spammers tend to type very short terms as "a" or "of", and the server collapses while trying to return the results. Therefore, I would like to establish the minimum number of characters for the search to be made, for example, three characters.
Relevanssi plugin seems to do this. But I would do without using any plugins.
Thanks in advance.