Commit 20fb3d39 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

A fix for bug 446645--make hyphens at the beginning of words still count as…

A fix for bug 446645--make hyphens at the beginning of words still count as negation for fulltext searching in MySQL. Patch By Jesse Clark <jjclark1982@gmail.com> r=mkanat, a=mkanat
parent da8a6f8b
......@@ -157,10 +157,10 @@ sub sql_fulltext_search {
$mode = 'IN BOOLEAN MODE';
# quote un-quoted compound words
my @words = quotewords('[\s()]+', 'delimiter', $text);
my @words = quotewords('[\s()]+', 'delimiters', $text);
foreach my $word (@words) {
# match words that have word chars, non-word chars, and no quotes
if ($word =~ /\w/ && $word =~ m/\W/ && $word !~ m/"/) {
# match words that have non-word chars in the middle of them
if ($word =~ /\w\W+\w/ && $word !~ m/"/) {
$word = '"' . $word . '"';
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment