1

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

1 Answer 1

2

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,

4
  • Thanks for that. I have noticed that the variable ft_min_word_len is in the section [mysql] not [mysqld]. The stop words are not an issue as it's names we are searching for, such as Al Pacino, Tom Cruise and Amy Smart, which all have first names less than the default 4 characters Jan 18, 2012 at 22:28
  • I also ran show variables like 'ft_min_word_len'; and it returns 4 still Jan 18, 2012 at 22:30
  • Did you restart mysql ??? Jan 18, 2012 at 23:36
  • The server administrator said he did, so I take his word for it... Jan 19, 2012 at 0:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .