Brion Vibber wrote:
MySQL's FULLTEXT indexing is used for the search
function; the index by
default ignores words shorted than some number of letters (3 or 4?).
Our search function does a primitive boolean search by parsing the search
query into words (eg, "dime a dozen" -> "dime", "a",
"dozen") and doing
separate MATCH queries on each one using the index, then ANDing the
results together logically. So an article has to match all words to come
If you just let MySQL 3.x match the phrase "dime a dozen", it will
return any entries that contain either "dime" or "dozen" and give
higher ranks to those that contain both or lots of these words. It's
more of an "or" than an "and", but it works very well. Is it really
worth the hassle to go through the splitting and anding? Do all users
really want the strict "and"? When I use Google I don't really want
an empty hit list.
--
Lars Aronsson (lars(a)aronsson.se)
Aronsson Datateknik -
http://aronsson.se/