Indexing 3 character search MySQL

Hi

I thought I’d share this as one of our client clients required to have a search using 3 characters in their magenta site.

The default value of search in MySQL is set to 4 characters but our client required 3 character searches, so you need to add this line to my.cnf and restart MySQL as follows

vi my.cnf

ft_min_word_len=3

Save my.cnf and restart service mysqld restart

That’s it, it will now search for minimum 3 characters and our clients client is now happy

I hope that helps someone

Many thanks

John

I ran into this the other day, handy info!