4

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...?

Libin TK
  • 1,477
  • 2
  • 25
  • 46
  • 2
    I also have 5.6.22 and smaller then 3 values of ft_min_word_len does not work. I mean I can also see the value is set to 2 in show variables and I rebuild the index, but it does not take into effect. The shortest string I can find with the fulltext index is still 3 characters long. – bpgergo Feb 02 '15 at 13:31
  • The closest solution I've found is `SELECT ProductName FROM products WHERE ProductName LIKE '%tv%' AND MATCH (ProductName) AGAINST ('+samsung' IN BOOLEAN MODE);` – Libin TK Feb 02 '15 at 13:43

1 Answers1

3

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

Libin TK
  • 1,477
  • 2
  • 25
  • 46