MySQL Fulltext Search

While debugging an internal database application for a client, I noticed searching for 3-letter words (or less) weren’t returning any results.

This is because MySQL’s default length is 4 characters. You can change this value by altering your my.cnf file to:

[mysqld]
ft_min_word_len=3

Don't forget you'll have to rebuild the index, after changing that parameter, so the new value is taken into account.

Alex Ho

Alex is the Lead Developer at NYCEDC working as a front-end/back-end developer and sysadmin. He has a Graphic Design certification from NYU and is a UX practitioner.