DO YOU NEED A CONTENT WRITER FOR YOUR BUSINESS?

Your One-Stop Solution for All Content Needs! Click here for more!
Categories: MySQL

SQl MATCH AGAINST find results with only more than 3 characters in the result

Share

In MySQL, while searching column using MATCH AGAINST keywords then the result matches all the row with search character more than 3.

If you see the system variable ft_min_word_len, which specifies the minimum length of words to be indexed by full-text searching, it defaults to 4, so 3-letter words won’t be found by full-text searching.

Run show variables like ‘ft_%’; to confirm that the word length matches what you set it to.

ft_min_word_len = 4  

You can change the effect by updating the ft_min_word_len variable in the my.cnf MySQL configuration file:

[mysqld]
ft_min_word_len = 3

Then you must restart the server and rebuild your FULLTEXT indexes.

For avoiding this issue, in this case, you can still use LIKE:

‘%$keyword%’ LIKE CONCAT(‘%’, Column, ‘%’)

Or regular expression:

‘%$keyword%’ REGEXP Column

Namaste UI

For any types of queries, you can contact us on info[at]namasteui.com.

Recent Posts

All You Need to Know about Low THC Oil Registry Card Georgia

Many of the states in the United States of America allow the use of medical…

1 week ago

Easy Ways to Strengthen Online Security and Privacy

Did you know that every time you browse this website or any other, you leave…

1 week ago

Play Anytime, Anywhere with GameZone Arcade Games

Online casino has gained immense popularity with the rise of online casinos. Platforms like GameZone…

1 week ago

Need to rank for seasonal keyword?

Every business has one or several peak seasons or periods of time during the year…

2 weeks ago

Himalaya Confido Results: What to Realistically Expect and When

Men searching for natural support often come across himalaya confido results — and the biggest question is…

2 weeks ago

Top Mutual fund houses and the differences between them

Looking to invest and get interest beyond your average savings account and fixed deposits? Well,…

2 weeks ago