How to get MySQL to create a FULLTEXT index of words with 1, 2, and 3 letters?

How to get MySQL to create a FULLTEXT index of words with 1, 2, and 3 letters?

Because in my table, many important words contain three-letter words like "PHP", "ASP", etc. And I just can't look for these lines using โ€œMATCH (...) AGAINST (...). I don't want to useโ€œ LIKE โ€because I want to improve performance when doing a search.

Any method to change this MySQL behavior?

+4
source share
1 answer

http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html

The minimum and maximum lengths of indexed words are determined by the system variables ft_min_word_len and ft_max_word_len. (See Section 5.1.3 โ€œServer System Variables.โ€) The minimum default value is four characters; the default maximum size is version dependent. If you change any value, you must rebuild your FULLTEXT indices.

I hope you can change this variable ..!

+5
source

Source: https://habr.com/ru/post/1380918/


All Articles