assela Pathirana:Mediawiki Wildcard Searching

From assela Pathirana
Revision as of 04:11, 22 March 2006 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Mediawiki does not allow wildcard searches like cat* to match cats.

The following modifications can enable those

In File SearchEngine.php
	function legalSearchChars() {
          #Assela return "A-Za-z_'0-9\\x80-\\xFF\\-";
          return "A-Za-z_'0-9\\x80-\\xFF\\-+*";
       }
       # + and * are added to the return string. 
In File SearchMySQL4.php
       #	if( $this->strictMatching && ($terms[1] == ) ) {
       #	$terms[1] = '+';
       #}
       # Comment out the above three lines. 


Source

LNK

See Also

Boolean Fulltext Searches chapter of MySQL manual.