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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T9719, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7719 - Wildcardsearch is not functional
Wildcardsearch is not functional
Status: RESOLVED DUPLICATE of bug 4021
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
1.7.x
PC Windows Server 2003
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  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: ---


Attachments

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.

Explanation:
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.


Navigation
Links