[Mediawiki-l] Searches for small words (in caps) return no results

Freek Dijkstra public at macfreek.nl
Fri Mar 31 16:48:06 UTC 2006


Hi,

Please change the test for "MediaWiki:Nonefound" in the default
installation from:

'''Note''': unsuccessful searches are often caused by searching for
common words like "have" and "from", which are not indexed, or by
specifying more than one search term (only pages containing all of the
search terms will appear in the result).

to:

'''Note''': unsuccessful searches are often caused by searching for
words shorter then 4 characters, or common words like "have" and "from",
which are not indexed, or by specifying more than one search term (only
pages containing all of the search terms will appear in the result).

I just spend quite some time figuring out why a search on "IP" did not
match a page, while I was sure I had a page on "IP Address ranges".

Obviously, this is a MySQL-specific problem (which only indexes words of
4 chars and up [1]), but I have the impression I'm not the only one who
encountered this "feature" of MySQL.

Alternatively, it is very well possible to make a workaround, and
recognize the fact that search with a short word is performed by MySQL,
but I dislike such a feature, so I propose a generic warning instead,
and just hope that MySQL makes it easier to change the min-word-length
on a per-table (or per-column or per-database) rather then a per-server
basis.

Regards,
Freek Dijkstra

[1] http://dev.mysql.com/doc/refman/4.1/en/fulltext-search.html
"Some words are ignored in full-text searches:
Any word that is too short is ignored. The default minimum length of
words that are found by full-text searches is four characters. [...]"

PS: I put the misleading "(in caps)" in the subject because I suspected
this was a case-related bug (somehow all my short words were all caps
;-) ); perhaps people will earlier spot this mail when they Google for
this quirck.



More information about the MediaWiki-l mailing list