views:

23

answers:

1

Hi, I have a mysql query as follows:

SELECT *, MATCH(songtitle) AGAINST('{keyword}') as Relevance FROM links WHERE approved = "true" AND MATCH(songtitle) AGAINST('{keyword}' IN BOOLEAN MODE) ORDER BY Relevance DESC, score DESC LIMIT 5

This works generally as expected, but for certain queries it will not return the right results. It would appear to have to do with the length or alphanumeric makeup of the keyword used.

For example, I have a row where the value of songtitle is "Jay Z". I also have several containing the name "Jay Sean"

Searching for "Jay" or "Jay Z" does not return any of these results. Searching for "Jay Sean" has the expected and desired result.

I'm guessing this has something to do with the small amount of characters in "Jay" and "jay z"?

Any info out there about this?

Thanks! Dave

+4  A: 

The variable you're looking for is ft_min_word_len, see http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html Rebuild your indexes afterwards.

Wrikken
If you have MySQL Administrator installed, look for Startup Variables > MySAM Parameters > Minimum Word.
h3xStream
thanks guys! worked a charm
CaliforniaDave