Articles on: Maintenance

Fulltext search for 3 char words

MySQL does not index words containing 3 or less characters by default. Searching for such short words will end up with no result.​

Here is the solution:

There is a system option named "ft\_min\_word\_len" by which you can define the minimum length of words to be indexed. You need to set value to this configuration directive in your MySQL configuration file.

If you don't want to change your configuration file there is also a handy method you can run. Just start your mysql daemon with the following command

mysqld --ft\_min\_word\_len=3

You may also need to rebuild your indexes after making these changes.

Now, you can search words with 3 characters in your full text queries.

Updated on: 23/02/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!