Tuesday, February 12th, 2008...3:17 am

Full-Text Search in MySql and the Minimum Indexed Word Length

Jump to Comments

MySql comes with extremely useful feature full-text search. The minor thing that bored me was the minimum word length that mysql can index to. It was 4 letters by default on my machine.

To change the value to desired one you need to:

  1. set ft_min_word_len variable up in my.ini file
  2. restart mysql
  3. ensure that the change was applied:

    SHOW VARIABLES LIKE ‘ft_min_word_len’

  4. rebuild table indices:

    ALTER TABLE Abc DROP INDEX `word_ind`, ADD FULLTEXT INDEX `word_ind`(`word`);

Detailed instructions could be found here – http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html

Leave a Reply