Three Letter Searches with MediaWiki

by default, mysql does not do a fulltext search for three (3)-character words. There are many instructions on the web on how to fix this, but none of them work. Or actually they do work on the mysql level, but mediawiki has its own problem.

Here are the basic steps:

  1. edit my.cnf and add ft_min_word_len=3 to all the proper places (ie, ‘[mysqldsafe]’ if that’s what you run.
  2. run php maintenance/updateSearchIndex.php inside the mediawiki dir

Here’s the part that had me stuck: Also, go to LocalSettings.php and make sure mediawiki is correctly set up for mysql4! See these lines:

# If you're on MySQL 3.x, this next line must be FALSE:
$wgDBmysql4 = $wgEnablePersistentLC = false;

You have to set that to ‘true’ or else it won’t work!

After that, restart mysqld and httpd, and it should be fine.