Difference between revisions of "Help:Short words in searches"
m (1 revision(s)) |
(→Changing minimum and maximum word lengths in MySQL) |
(No difference)
|
Latest revision as of 22:57, 7 February 2006
Changing minimum and maximum word lengths in MySQL
From MySQL's docs on Fine-Tuning MySQL Full-Text Search:
The minimum and maximum length of words to be indexed is defined by the ft_min_word_len
and ft_max_word_len
system variables (available as of MySQL 4.0.0). See Section 5.3.3, “Server System Variables”. The default minimum value is four characters. The default maximum depends on your version of MySQL. If you change either value, you must rebuild your FULLTEXT
indexes. For example, if you want three-character words to be searchable, you can set the ft_min_word_len
variable by putting the following lines in an option file (you can simply put these lines in my.cnf):
[mysqld] ft_min_word_len=3 [myisamchk] ft_min_word_len=3
Then restart the server
mysqladmin shutdown mysqld_safe &
and rebuild your FULLTEXT
indexes. Also note particularly the remarks regarding myisamchk in the instructions following this list.
- to do this, simply run the mediawiki rebuild text script by executing a mediawiki maintenance script found in the wiki/maintenace directory
php rebuildtextindex.php
You might want to consult this site [1] for further reference.