tags:

views:

46

answers:

1

Currently I have the following query...

SELECT id, 
       LOWER(title) as title, 
       LOWER(sub_title) as sub_title
  FROM ebay_archive_listing
 WHERE MATCH(title, sub_title) AGAINST ("key" IN BOOLEAN MODE)

However it is not finding rows where the title contains the word "key". "key" is generated dynamically based on a set of keywords, so sometimes it contains + and - symbols.

+1  A: 

MySQL's default fulltext indexing settings won't index or match any word of fewer than four letters.

If you have a phrase made entirely of words of fewer than four letters like key you have to manually fall back to an unindexed LIKE search instead.

You can change this behaviour by lowering the ft_min_word_len setting. You might also want to change or disable the list of ‘stopwords’ (which are also not indexed) whilst you're at it, as the default list is brutal and bizarre.

bobince