Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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,

share|improve this answer
    
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 –  PaparazzoKid Jan 18 '12 at 22:28
    
I also ran show variables like 'ft_min_word_len'; and it returns 4 still –  PaparazzoKid Jan 18 '12 at 22:30
    
Did you restart mysql ??? –  RolandoMySQLDBA Jan 18 '12 at 23:36
    
The server administrator said he did, so I take his word for it... –  PaparazzoKid Jan 19 '12 at 0:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.