whoisgregg - 1:24 pm on Sep 30, 2010 (gmt 0)
So given a user-entered search term of `red fuzzy widgets` I would first run this query against the ad table:
SELECT * FROM `ads` WHERE `keywords` LIKE '%red%' OR `keywords` LIKE '%fuzzy%' OR `keywords` LIKE '%widgets%';
Then only check those specific keyword phrases against the user-entered search term? I can see that working for quite a few situations, but I can think of a few situations where it doesn't -- particularly stemming.
For example, if the keyword is "blue widget" and the user entered `blue widgets` then doing a LIKE '%widgets%' would *not* bring up the singular form in the table. :/
I think I'll go do some research into stemming algorithms.