We help IT Professionals succeed at work.

MYSQL Fulltext fine-tuning

coolispaul asked
Last Modified: 2008-01-09

I want to change the default limit on string length that fulltext seraches from 4 to 3
how can i do this from the command line or how is it done in general?
Watch Question

You can do that by setting the variable
in your config file for the mysql server.


i have tried changing the value, restarting mysql and repairing the table but to no avail
How did u change value?  If you changed it and restarted the mysql server, does it still keep the new value?
Also, you need to rebuild the index.  Repair table does not necesarily do that.  Try dropping and re-creating the full text index.



how can i see the value?
i tried using "show variables like %ft_min_word_len" but nothing showed.
i added ft_min_word_len = 3 to "my.cnf" file on server - is this right?
i did repair the table and restart the mysql server too

In order to see the variable value you need to include it in single or double quotes.  Try ...

show variables like 'ft_min_word_len';

>>i did repair the table and restart the mysql server too
This alone would not help.  You will need to rebuild the index.  I believe the best thing would be to drop the index and then recreate it.



Ok i will try redoing the index.

Could you help me find out what the server thinks ft_min_word_len is?

I tried - show variables like 'ft_min_word_len'; but got an empty set so i then tried
show variables;

but didnt see that variable in the list.

Which version of mysql are you using?  This variable was added as of mysql 4.0



Does this mean i cannot change the default min word len?
Fulltext does work in this version of mysql though

Unlock this solution and get a sample of our free trial.
(No credit card required)


ok thanks. I will look into doing this - is it easy enough and will this have any impact on websites that already use this version?
>>>is it easy enough and will this have any impact on websites that already use this version?
Its easy if you know the OS where you are installing it.  The impact depends on your usage mysql.  It is possible, you might be using a deprecated function or a name for a table that is now a reserved word.  I suggest you take a look at the upgrade instructions for the version you wish to upgrade to.
For 5.0, checkout following section ...

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.