MySql Fulltext search using 2 character word

眉间皱痕 提交于 2019-12-06 04:39:25

问题


I've set ft_min_word_len = 1 and running show variables like 'ft%'; also shows the same. Also have already updated the Fulltext indexes by dropping and re-creating them.

But when I run SELECT OriginalProductName FROM products WHERE MATCH (ProductName) AGAINST ('+samsung +tv' IN BOOLEAN MODE); against a row which is having "Samsung Hg55nc890xf 3d 1080p Led lcd Tv Hdtv" as value it returns 0 results.

It works as expected when I execute SELECT OriginalProductName FROM products WHERE MATCH (ProductName) AGAINST ('+samsung +led' IN BOOLEAN MODE);

I am using MySQL 5.6.22. Innodb is the Table engine.

How can make MySql Fulltext search to search 2 character words like tv, 32, US etc...?


回答1:


I found that this issue was specific to innodb storage engine. I've solved the issue by adding [mysqld] innodb_ft_min_token_size =2; to /etc/my.cnf



来源:https://stackoverflow.com/questions/28278288/mysql-fulltext-search-using-2-character-word

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!