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

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       |
|---------------------------------------------------------|

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |