MySQL – How to change the FULLTEXT SEARCH 4 character minimum behaviour
Thursday, January 14, 2010 23:56Posted in category Database
No Comments

By default the FULLTEXT minimum characters behaviour is set to 4 characters. To check what value is preset on your server type the following query:
SHOW VARIABLES LIKE ‘ft%’;
That shoud bring up a result similar to this:
| Variable_name | Value | 
|---|---|
| ft_boolean_syntax | + -><()~*:”"&| | 
| ft_max_word_len | 84 | 
| ft_min_word_len | 4 | 
| ft_query_expansion_limit | 20 | 
| ft_stopword_file | (built-in) | 
To change the ftp_min_word_len you have to edit the my.ini configuration file.
Below [mysqld] add this line to decrease the min. word length to 3 characters:
ft_min_word_len = 3
Restart your server and rebuild the existing indexes by using the following query:
REPAIR TABLE tableNameHere QUICK;
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.