1

I'm using MySQL FullText Index Search on my system and when I search with 3 characters the query works well but when I search with 2 characters the query returns null.

I use this query:

select * 
from table 
where MATCH (description) AGAINST ('+gp*' IN BOOLEAN MODE)

I already use this command show variables like 'ft%' to get the value of ft_min_word_len and the value is 4. It is strange that with 3 characters the query works.

However i tried to change this value on file /root/.my.cnf. (I use Ubuntu 14.04 and server pilot). I add this to the file:

[mysqld]
innodb_ft_min_token_size=2
ft_min_word_len=2

Restart the mysql, drop index and create index.

Although when I execute this command again show variables like 'ft%' the value still remains 4.

How do I use mysql full text search with 2 characters?

Any help will be appreciated!

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
sampaioPT
  • 95
  • 1
  • 2
  • 9

1 Answers1

3

Correct location of the my.cnf?

/etc/mysql/my.cnf

Take a look here or here

Community
  • 1
  • 1
mkey
  • 124
  • 5
  • Thank you so much @mkey! I'm so stupid :) I'm following this link (from server pilot)-> https://serverpilot.io/community/articles/how-to-access-mysql-with-the-mysql-root-user.html and it isn't the correct file! I owe you one beer! :D – sampaioPT Jun 27 '16 at 14:14