Home Learn More Purchase Knowledge Base Support Contact

Search:     Advanced search

How to change ft_min_word_len variable

Article ID: 273
Last updated: 07 Dec, 2009
Add comment
Views: 1734
Comments: 0

Normally it is not recommended to change variables that control MySQL fulltext index behaviour (such as ft_min_word_len or ft_max_word_len) but if you really need to...

MySQL config file would usually be found on Windows under C:\Windows\my.ini and on Linux under /etc/my.cnf Edit the file and add

[mysqld]
ft_min_word_len = 3

The default value is 4 and the above will change it to 3. You can change ft_max_word_len in the same manner:

[mysqld]
ft_max_word_len = 150

After changing the variable(s) in config file restart MySQL server and you're done. You can then check the values in phpMyAdmin under "Show MySQL system variables" to make sure your changes have taken place.

And finally rebuilt fulltext index by running following sql:
(replace prefix for your one if required  kbp_kb_entry -> your_pref_kb_entry)

REPAIR TABLE kbp_kb_entry, kbp_kb_comment, kbp_kb_rating_feedback, kbp_feedback, kbp_file_entry,  kbp_news;


Check variable:

SHOW VARIABLES LIKE 'ft_min_word_len';
This article was:   Helpful | Not Helpful Add comment
Prev   Next
How can I do a mass find and replace in articles?     How do I change the PHP memory limit?


© 2008 Double Jade LLC | customer.service@kbpublisher.com