Friday, December 9, 2011

help with full-text 3 letter "words"

I am using full-text with a table that uses the MyISAM engine.
Searches seem to work pretty well, except when my dataset is too small
or words are too short. When there are too few rows, some of the data
is not unique enough to be full-text indexed based on what I have read
in MySQL docs. I think this condition will go away once I have more
diverse data (i.e. real-life data).

My bigger need with full-text is to find 3 character words like "zap".
Currently, if I try to search on zap, data is not found. But, if I
change the word to "zapf" it is found. That leads me to think that 3
character words aren't being indexed by Cloud SQL. Is that the case?
If so, how do I fix that?

For example, do I need to edit the Cloud SQL equivalent of the MySQL
my.cnf file? If so, how do I do that?

Possible change needed to my.cnf for my Cloud SQL instance:
[mysqld]
ft_min_word_len=3

[myisamchk]
ft_min_word_len=3

Note: "zap" does not appear to be in the standard MySQL full-text
stopwords list.

No comments:

Post a Comment