Hi
How can I set Minimum search length to 1 character?
Best Regards
Quote from: bitmovel on October 01, 2008, 04:20:44 AM
Hi
How can I set Minimum search length to 1 character?
Best Regards
thank you for all the replies. :)
here is the solution, on Sources/Search.php
/* elseif (strlen($value) < 2)
{
$context['search_errors']['search_string_small_words'] = true;
unset($searchArray[$index]);
}*/
I have to wonder what your reason for doing this is :). I can't see it being good for search performance either.
Anyone else who wants to did this will also need to make sure that they either don't use the fulltext search option or that the fulltext minimum character setting in MySQL is also set to 1.
I have a movie related forum
a search example was:
'how i met your mother'
the search returned a error, since it could not search the word 'I'
This had to be done ;)
Which search method are you using? :)
at the moment I am using Fulltext index in SMF 2.0 b3
this worked for me. should I have done something else?
Yeah just search for "how met your mother", it will ignore the single characters and return the same results as well. Also reduce load on the server for finding each and every 'i' in a post.