Last modified: 2010-05-15 15:41:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7719 - Wildcardsearch is not functional
Wildcardsearch is not functional
Status: RESOLVED DUPLICATE of bug 4021
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
PC Windows Server 2003
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-10-26 18:12 UTC by Carl Duisberg
Modified: 2010-05-15 15:41 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Carl Duisberg 2006-10-26 18:12:36 UTC
Boolean full-text searches in MySQL can use asterix as a wild card.

Unfortunately it does not work in MediaWiki.

SearchMySQL4.php has to be changed.
Comment 1 Daene.Bertrand 2007-05-25 15:21:46 UTC
In the file SearchMySQL4.php I added the lines
 function legalSearchChars() {
  return "A-Za-z_'0-9\\x80-\\xFF\\-+~<>*";
before line
 function parseQuery( $filteredText, $fulltext ) {

And until now it seems to work fine.
I have corrected today And I have not yet found any side effect.

Before calling parseQuery, the class SearchEngine call function filter that uses legalSearchChars list to filter out the input text but the legalSearchChars function in SearchEngine have only the minus as wildcard, so the $filterdText recevived by parseQuery has no more the '*' and so cannot pass it to MySql. Adding the lines above create override the function for the class SearchMySQL4 that is build over class SearchEngine.
Note: function parseQuery correctly specify to use legalSearchChars from SearchEngine to define legal characters thzt are not wildcard!
Comment 2 Brion Vibber 2007-09-11 18:41:39 UTC

*** This bug has been marked as a duplicate of bug 4021 ***

Note You need to log in before you can comment on or make changes to this bug.