I have a table called 'business' with the following sample data:
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's wrong with the last query?
Any ideas?
Update the ft_min_word_len
variable in the my.cnf
MySQL configuration file:
[mysqld]
ft_min_word_len=N
Note that afterwards indexes must be rebuilt.
Fulltext search stop some common word, but it is disable using this steps.
1: open my.ini file in MYSQL configuration file.
2: place ft_min_word_len=1 line after [mysqld] line in my.ini
[mysqld]
ft_min_word_len=1
3: restart your server
4: repair your table using below command
repair table tablename;
5: now your search is working....
Looks like you're running into the minimum length limit, as stated in the MySQL docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With