Mailing List Archive

possible to permit searches on 3 or fewer words?
I want to let my users search for 3-letter queries (which are common
for acronyms used in my wiki). Is there some reason for the setting
$wgDBminWordLen = 4;
in the file
DefaultSettings.php
and would anything be harmed if I changed that line to assign a value
of 3?

I'm a bit reluctant to do this, in case there might be unforseen
problems ensuing. (I note that the error message implies not that
short search items are prevented by choice, but rather by necessity ...
that's why I'm a little scared to change the line without advice.)

Dan E. Kelley, Associate Professor phone:(902)494-1694
Oceanography Department, Dalhousie University fax:(902)494-2885
Halifax, Nova Scotia mailto:Dan.Kelley@Dal.CA
Canada B3H 4J1 http://www.phys.ocean.dal.ca/~kelley/Kelley_Dan.html
Re: possible to permit searches on 3 or fewer words? [ In reply to ]
dan kelley wrote:
> I want to let my users search for 3-letter queries (which are common for
> acronyms used in my wiki). Is there some reason for the setting
> $wgDBminWordLen = 4;
> in the file
> DefaultSettings.php
> and would anything be harmed if I changed that line to assign a value of 3?
>
> I'm a bit reluctant to do this, in case there might be unforseen
> problems ensuing. (I note that the error message implies not that short
> search items are prevented by choice, but rather by necessity ... that's
> why I'm a little scared to change the line without advice.)

This variable is used when running with MySQL 3.x to discard words that
MySQL will not return any results for so that they don't nix your entire
boolean AND'ed search.

You need to configure MySQL to use a shorter minimum word length in its
fulltext index to actually _get_ any results for shorter words.

If you're using MySQL 4.x, then don't bother touching $wgDBminWordLen
since it won't be used; just configure MySQL directly.

See http://dev.mysql.com/doc/mysql/en/Fulltext_Fine-tuning.html

-- brion vibber (brion @ pobox.com)