MySQL – Changing FT_MIN_WORD_LEN (the.ini)

configurationfull-text-searchMySQLsqlwindows-server-2003

I've recently asked my server administrator, for my Windows dedicated server, to change the MySQL configuration file (my.cnf) to allow search words of 2 characters or more, from the default of 4.

They said they have changed it, restarted MySQL and re-booted the server but I have seen no changes. I've rebuilt the indexes only on the tables that this particular script uses, using the REPAIR TABLE method but still doesn't work as it should.

Is this right? After searching my server for my.ini files? Seeming as 5.0 is my latest version.

enter image description here

Version 4.1 has two files in C:Program Files\MySQL\MySQL Server 4.1 and two files in C:Documents and Settings\manage\Desktop\MySQL Server 4.1, my latest version, 5.0, only has one .ini file in C:Program Files…

Best Answer

You may also want to create a custom stopword list because there are 640 words that are excluded from FULLTEXT indexes. Some of those two letter words omitted are: on, of, it, is. Take a look at the full list.

Perform the following

Step 01) Create a stopwords.txt file

echo "a" > C:\mysql_stopwords.txt
echo "an" >> C:\mysql_stopwords.txt
echo "the" >> C:\mysql_stopwords.txt

Step 02) Add these line to my.ini

[mysqld]
ft_min_word_len=2
ft_stopword_file=C:/mysql_stopwords.txt

Step 03) Restart mysql

net stop mysql
net start mysql

Step 04) Reindex all FULLTEXT indexes

Sorry I forgot this was Windows. I changed my answer to reflect Windows,

Related Topic