Difference between revisions of "Allow searching for short terms in mediawiki"

From Linuxintro
imported>ThorstenStaerk
(New page: Edit /etc/my.cnf, add a line ft_min_len=1 below [mysqld] = See also = http://www.mediawiki.org/wiki/Manual:FAQ#.E2.80.A6is_a_search_for_a_short_keyword_giving_no_hits.3F)
 
imported>ThorstenStaerk
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Edit /etc/my.cnf, add a line
+
When you set up [[mediawiki]] by default, you cannot search for words shorter than 4 letters. To change this, edit /etc/my.cnf.
ft_min_len=1
+
 
below
+
In the section
 
  [mysqld]
 
  [mysqld]
 +
add a line
 +
ft_min_word_len=1
 +
 +
Then
 +
* restart mysql
 +
/etc/init.d mysql restart
 +
* recreate your wiki's search index
 +
mysql
 +
use wikidb;
 +
REPAIR TABLE searchindex QUICK;
  
 
= See also =
 
= See also =
 
http://www.mediawiki.org/wiki/Manual:FAQ#.E2.80.A6is_a_search_for_a_short_keyword_giving_no_hits.3F
 
http://www.mediawiki.org/wiki/Manual:FAQ#.E2.80.A6is_a_search_for_a_short_keyword_giving_no_hits.3F

Latest revision as of 04:34, 30 April 2009

When you set up mediawiki by default, you cannot search for words shorter than 4 letters. To change this, edit /etc/my.cnf.

In the section

[mysqld]

add a line

ft_min_word_len=1

Then

  • restart mysql
/etc/init.d mysql restart
  • recreate your wiki's search index
mysql 
use wikidb;
REPAIR TABLE searchindex QUICK;

See also

http://www.mediawiki.org/wiki/Manual:FAQ#.E2.80.A6is_a_search_for_a_short_keyword_giving_no_hits.3F