MySQL MATCH not working with two characters?

I have a table called "business" with the following data examples:

Street - 150 N Michigan Ave. City - Chicago State - IL Zip - 60601 

When I run a query like

 SELECT business.* WHERE MATCH(business.Street, business.City, business.State, business.Zip) AGAINST('*150*' IN BOOLEAN MODE) -- IT WORKS SELECT business.* WHERE MATCH(business.Street, business.City, business.State, business.Zip) AGAINST('*Chicago*' IN BOOLEAN MODE) -- IT WORKS SELECT business.* WHERE MATCH(business.Street, business.City, business.State, business.Zip) AGAINST('*60601*' IN BOOLEAN MODE) -- IT WORKS SELECT business.* WHERE MATCH(business.Street, business.City, business.State, business.Zip) AGAINST('*IL*' IN BOOLEAN MODE) -- DOESNT WORK!! 

So what happened to the last request?

Any ideas?

+7
mysql match
source share
3 answers

Update the ft_min_word_len variable in the my.cnf MySQL configuration my.cnf :

 [mysqld] ft_min_word_len=N 

Note that subsequently indexes must be rebuilt.

+6
source share

It looks like you are working with a minimum length limit, as indicated in the docs .

+1
source share

Full-text search stops a common word, but it is disabled using these steps.

1: open the my.ini file in the MYSQL configuration file.

2: place ft_min_word_len = 1 line after the [mysqld] line in my.ini

 [mysqld] ft_min_word_len=1 

3: restart the server

4: repair the table using the following command

tabulation table table

5: now your search is working ....

-one
source share

All Articles