Wiki

New Case Case Status
Log In

Wiki

 
Short Word Searching
  • RSS Feed

Last modified on 3/23/2011 7:27 PM by User.

Tags:

Short Word Searching

Both MySQL and Datafeed Studio have a configuration setting that determines the minimum length that it considers to be a valid 'word' for full-text searching.

These must be set to the same value.

 

The DS setting is controlled via the 'Min Word Length' option in the Config->General Settings tab of the DS admin site.

 

The MySQL setting is stored in a variable called 'ft_min_word_len' (Google that for much more information).

 

Out of the box, the MySQL default is 4 (which is useless for a search like 'Wii').

 

Unfortunately changing the MySQL value depends on how much control you have over your server. If you are on shared hosting this might not be possible and you will be stuck with whatever your host has set, unless they are willing to change it.

 

If you are a dedicated/VPS server then typically your MySQL configuration file will be stored in /etc/my.cnf .

 

If so adding the line :

 

ft_min_word_len=3

 

to the [mysqld] section of the file will set it to 3 (obviously change that to whatever you want, but then update the DS setting mentioned above to match it).

 

After changing the MySQL setting you will need to restart the MySQL server and then enter the MySQL command-line interface and enter the following commands to rebuild the text index.

 

mysql> use datafeed_studio 

mysql> alter table products drop index fullname_index; 

mysql> create fulltext index fullname_index on products(name);

 

That's "it".