Home Features Pricing Support Contact
Search:     Advanced search

How to change ft_min_word_len variable

Article ID: 273
Last updated: 07 Apr, 2015

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

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:

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 tables if required  kbp_kb_entry -> your_prefix_kb_entry)

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

Check variable:

SHOW VARIABLES LIKE 'ft_min_word_len';

Article ID: 273
Last updated: 07 Apr, 2015
Revision: 1
Views: 18074
Comments: 0
Print Export to PDF Subscribe Share Add comment
This article was:   Helpful | Not helpful
Prev   Next
How can I backup and restore database?     How do I change the PHP memory limit?