Difference between revisions of "assela Pathirana:Mediawiki Wildcard Searching"
From assela Pathirana
Jump to navigationJump to search
Line 6: | Line 6: | ||
function legalSearchChars() { | function legalSearchChars() { | ||
# | #return "A-Za-z_'0-9\\x80-\\xFF\\-"; | ||
return "A-Za-z_'0-9\\x80-\\xFF\\-+*"; | return "A-Za-z_'0-9\\x80-\\xFF\\-+*"; | ||
} | } |
Revision as of 04:11, 22 March 2006
Mediawiki does not allow wildcard searches like cat* to match cats.
The following modifications can enable those
- In File SearchEngine.php
function legalSearchChars() { #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
- See Also
Boolean Fulltext Searches chapter of MySQL manual.