Bootstrap FreeKB - mySQL / MariaDB - Minimum maximum fulltext word length
mySQL / MariaDB - Minimum maximum fulltext word length

Updated:   |  mySQL / MariaDB articles

One of the issues with fulltext is that the default minimum word length returned is 4 characters.  For example, words which are 4 characters or more such as jack jill hill water will be displayed in the search results.  Words 3 characters or less will not be searched.  This is most problematic when dealing with abbreviations such as FTP (file transfer protocol) and DNS (domain name service).  To change the minimum word length to 3 character, add the following to your /etc/my.cnf file.

ft_min_word_len = 3

 

The ps command can be used to determine if your system is using init or systemd. If PID 1 is init, then you will use the service command. If PID 1 is systemd, then you will use the systemctl command.

If your system is using systemd, use the systemctl command to start and enable mariadb.

systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb

 

If your system is using init, use the chkconfig and service commands to start and enable mariadb.

chkconfig mariadb on
service mariadb start
service mariadb status

 

Type mysql -u root -p and press enter to connect to MariaDB.

mysql -u root -p
. . .
Enter password:

 

Repair your fulltext index table.

repair table table_name quick

|---------------------------------------------------------|
| Table                    | Op     | Msg_type | Msg_text |
|---------------------------------------------------------|
| database_name.table_name | repair | status   | OK       |
|---------------------------------------------------------|

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 454add in the box below so that we can be sure you are a human.