On Fri, 21 Feb 2003, Fred Bauder wrote:
What's this all about?
$wgDBminWordLen = 3; # Match this to your MySQL fulltext
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
up in the results. But, the "a" is too short (and anyway a stopword --
another issue itself) and so ignored by the search; it doesn't match *any*
articles.
So, we have to know which words are going to be ignored by MySQL's
fulltext search so we can skip them. "dime a dozen" -> "dime" and
"dozen".
This would go away using MySQL 4, which has a boolean search mode for its
fulltext searching, but since there are a lot of mysql3 installations out
there we'd have to keep this around as an option.
See the mySQL docs:
http://www.mysql.com/doc/en/Fulltext_Search.html
-- brion vibber (brion @
pobox.com)