I can set it a new value by adding this line under the [mysqld] section in my.cnf configuration file:

ft_min_word_len = 3 // or any other length

But I don't want that. I want to know, can I do that in a specific query? I have this query:

select * from mytable where match(mycol) against(:val)

And I want to change ft_min_word_len just for query above. I don't want to change it in MySQL configuration file. I mean I want to have another min word length for other queries.

1 Answer 1


Short answer: Not possible.

Long answer...

That setting is used when any MyISAM FULLTEXT index is being built. You should change to InnoDB, in which case innodb_ft_min_token_size is the variable to set. (It defaults to 3.)

If you change the setting after the index is built, it has no effect on existing indexes or queries using those indexes.

The only way to change it is to (1) change it in my.cnf, then (2) rebuild the index on any table for which you want the new length.

  • As a note, this is how you can rebuild the index on a table: REPAIR TABLE my_table QUICK;
    – Martin AJ
    Jan 20, 2017 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.