[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

MYSQL Fulltext fine-tuning

Hi

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?
0
coolispaul
Asked:
coolispaul
  • 10
  • 5
1 Solution
 
akshah123Commented:
You can do that by setting the variable
ft_min_word_len
in your config file for the mysql server.
0
 
coolispaulAuthor Commented:
i have tried changing the value, restarting mysql and repairing the table but to no avail
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
akshah123Commented:
How did u change value?  If you changed it and restarted the mysql server, does it still keep the new value?
0
 
akshah123Commented:
Also, you need to rebuild the index.  Repair table does not necesarily do that.  Try dropping and re-creating the full text index.
0
 
coolispaulAuthor Commented:
hi,

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

0
 
akshah123Commented:
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';

0
 
akshah123Commented:
>>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.
0
 
coolispaulAuthor Commented:
Hi,

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.

Thanks
0
 
akshah123Commented:
Which version of mysql are you using?  This variable was added as of mysql 4.0
0
 
coolispaulAuthor Commented:
3.23.58

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

0
 
akshah123Commented:
I am afraid you cannot change that value.  That variable was added in mysql 4.0.  Besides this option issue, you should really look into upgrading your mysql server.  Currently, mysql's stable version is 5.0 and production release for 5.1 will be available pretty soon.

There are a lot of features you can gain by upgrading including sub queries, stored procedures, user defined functions, etc.

If upgrading the server is not an option then you will have to deal with the default value.
0
 
coolispaulAuthor Commented:
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?
0
 
akshah123Commented:
>>>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.
0
 
akshah123Commented:
For 5.0, checkout following section ...
http://dev.mysql.com/doc/refman/5.0/en/installing.html
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 10
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now