Badal
Badal

Reputation: 3807

Disable MySQL fulltext search stopwords in innodb

I am using a FullText index on MySQL v5.6 InnoDB table.

and running this query to perform search on the table

SELECT * FROM `table` WHERE MATCH(title,desc) AGAINST ('+hello -for' IN BOOLEAN MODE);

when i run the above query it still gives me the results which includes word for in the title or desc.

I have already made the following changes in my my.cnf file to avoid stopwords.

innodb_ft_min_token_size=2
ft_min_word_len=2
ft_stopword_file = ""

Why i am still getting results with word for included in it?

Upvotes: 1

Views: 2389

Answers (1)

Anthony
Anthony

Reputation: 37065

You need to ensure that the server variable innodb_ft_enable_stopword is set to OFF if you aren't wanting to use stop words at all.

SET @@SESSION.innodb_ft_enable_stopword = 'OFF';

Upvotes: 3

Related Questions