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

How Data Analytics Is Actually Driving Smarter Marketing Decisions

Most marketing teams aren't failing because they lack data. They're failing because they can't act…

23 hours ago

The Ultimate SPF Tester Guide: Boost Email Deliverability In Minutes

Email marketing continues to be one of the most effective ways for businesses to communicate,…

24 hours ago

Sales Ops: A role that helps sales teams work as efficiently as possible

Xerox first introduced it around the mid-1970s. The need came up because the management activities…

6 days ago

Forex Investment Tips for Beginners

Investing in the forex market may look to be a dangerous game. With some worthwhile…

1 week ago

How Did The Restaurant Industry change In Post Pandemic Era?

The coronavirus outbreak has drastically changed the way we live our lives. Yes, that's absolutely…

3 weeks ago

A Guide To CPQ and How It Fuels Marketing and Sales

Sales and marketing teams help attract, convert, and retain customers to ensure an organization’s long-term…

4 weeks ago