Page 1 of 1
question on searchplugin-how to search Keywords less 3 chars
Posted: Thu Mar 22, 2007 11:13 am
by wasabi
Hello forum,
is there a way to make the search plugin find words and acronyms smaller than 3 characters?
I am using a serendipity blog at work where many people post their documentations with LOTS of acronyms. Searching an acronym with 3 chars, which is quite usual in IT, fails with the following message (in german):
Die Wörter Ihrer Suchanfrage müssen länger als 3 Zeichen sein...
Means more or less in English:
"the words in your search must be longer than 3 characters..."
Thank you in advance and kind regards,
Wasabi/Claudio
Re: question on searchplugin-how to search Keywords less 3 c
Posted: Thu Mar 22, 2007 11:29 am
by garvinhicking
Hi!
is there a way to make the search plugin find words and acronyms smaller than 3 characters?
Sadly not easily, because s9y depends on the MySQL fulltextsearch which cannnot operate on words with less than 3 characters unless the MySQL server configuration is changed.
You might be able if you search for "acronym*" to get more hits?
Best regards,
Garvin
Posted: Thu Mar 22, 2007 12:06 pm
by wasabi
Hello Garvin
....unless the MySQL server configuration is changed
OK, the server configuration HAS changed via "ft_min_word_len=2"
the mysql-server is restarted, the indexes have been rebuilt, even our companie´s Intranet-apache has started over

) but the problem persists
Is there anything else I can do?
Thank you in advance for your answer,
Claudio
Posted: Thu Mar 22, 2007 12:49 pm
by garvinhicking
Hi!
OK, the server configuration HAS changed via "ft_min_word_len=2"
the mysql-server is restarted, the indexes have been rebuilt, even our companie´s Intranet-apache has started over

) but the problem persists
Is there anything else I can do?
Yes, in fact you MUST patch the file include/genpage.inc.php and search for:
Code: Select all
if (strlen($serendipity['GET']['searchTerm']) <= 3) {
Sadly there is no easy way for a PHP script to fetch ft_min_word_len of the mysql server configuration without doing a lot of performanse intense querying of the full configuration.
HTH,
Garvin
Posted: Thu Mar 22, 2007 1:17 pm
by wasabi
HTH,
Garvin
Yes indeed, that helped! Now we finally can search for e.g. tcp, udp, ftp, stp, vtp, bgp, etc.
Once again thank you very much for your fantastically fast & professional help!
Kind regards und Grüße nach Köln,
Wasabi/Claudio
Posted: Thu Mar 22, 2007 2:28 pm
by garvinhicking
Hi!
No problem. Thanks for letting me know it now works! Have fun!
Best regards,
Garvin