Last modified: 2010-05-15 15:28:21 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 811 - search doesn't return results when there is more than one match
search doesn't return results when there is more than one match
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
1.3.x
PC Linux
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.io.tudelft.nl/id/mediawiki
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-31 17:40 UTC by Maurits van der Schee
Modified: 2010-05-15 15:28 UTC (History)
0 users

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


Attachments

Description Maurits van der Schee 2004-10-31 17:40:31 UTC
The search doesn't return results when there is more than one match. I changed
the code in line 329-330 of includes/SearchEngine.php from:

$cond .= " (MATCH (##field##) AGAINST ('" .wfStrencode( $word ). "'))";

to:

$cond .= " (##field## REGEXP '[[:<:]]".wfStrencode( $word )."[[:>:]]')";

Now it works as expected. Just wanted to share this. 

Context: Redhat 9 default installation with apache and mysql.
Comment 1 Brion Vibber 2004-10-31 23:55:12 UTC
What does "more than one match" mean? What are the actual results? What 
are you testing with? Can you confirm that the search index is correct? Are 
the terms too short for the search index?

If you do this, your search will be *incredibly* slow since it will scan the 
entire database's text, entry by entry, on every search.
Comment 2 Brion Vibber 2004-11-01 09:41:30 UTC
The sample search term provided via e-mail works fine after addition of a third page to the 
wiki so that term was not automatically discarded as uninformative (present in 50% of the 
search database).

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


Navigation
Links