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
question on searchplugin-how to search Keywords less 3 chars
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: question on searchplugin-how to search Keywords less 3 c
Hi!
You might be able if you search for "acronym*" to get more hits?
Best regards,
Garvin
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.is there a way to make the search plugin find words and acronyms smaller than 3 characters?
You might be able if you search for "acronym*" to get more hits?
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hello Garvin
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
OK, the server configuration HAS changed via "ft_min_word_len=2"....unless the MySQL server configuration is changed
the mysql-server is restarted, the indexes have been rebuilt, even our companie´s Intranet-apache has started over
Is there anything else I can do?
Thank you in advance for your answer,
Claudio
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
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
Yes, in fact you MUST patch the file include/genpage.inc.php and search for: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?
Code: Select all
if (strlen($serendipity['GET']['searchTerm']) <= 3) {
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
No problem. Thanks for letting me know it now works! Have fun!
Best regards,
Garvin
No problem. Thanks for letting me know it now works! Have fun!
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/