Commit d7e5d9fd authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 314364: Make QuickSearch use "matches" for comment searches instead of "substring"

Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=mkanat
parent 75e51618
...@@ -68,13 +68,6 @@ sub get_param_list { ...@@ -68,13 +68,6 @@ sub get_param_list {
}, },
{ {
name => 'quicksearch_comment_cutoff',
type => 't',
default => '4',
checker => \&check_numeric
},
{
name => 'specific_search_allow_empty_words', name => 'specific_search_allow_empty_words',
type => 'b', type => 'b',
default => 1 default => 1
......
...@@ -167,8 +167,6 @@ sub quicksearch { ...@@ -167,8 +167,6 @@ sub quicksearch {
$searchstring =~ s/\s+NOT\s+/ -/g; $searchstring =~ s/\s+NOT\s+/ -/g;
my @words = splitString($searchstring); my @words = splitString($searchstring);
my $searchComments =
$#words < Bugzilla->params->{'quicksearch_comment_cutoff'};
my @openStates = BUG_STATE_OPEN; my @openStates = BUG_STATE_OPEN;
my @closedStates; my @closedStates;
my @unknownFields; my @unknownFields;
...@@ -245,10 +243,8 @@ sub quicksearch { ...@@ -245,10 +243,8 @@ sub quicksearch {
} }
} }
elsif ($firstChar eq '#') { elsif ($firstChar eq '#') {
addChart('short_desc', 'anywords', $baseWord, $negate); addChart('short_desc', 'substring', $baseWord, $negate);
if ($searchComments) { addChart('content', 'matches', $baseWord, $negate);
addChart('longdesc', 'anywords', $baseWord, $negate);
}
} }
elsif ($firstChar eq ':') { elsif ($firstChar eq ':') {
foreach (@subWords) { foreach (@subWords) {
...@@ -386,10 +382,7 @@ sub quicksearch { ...@@ -386,10 +382,7 @@ sub quicksearch {
addChart('status_whiteboard', 'substring', addChart('status_whiteboard', 'substring',
$word, $negate); $word, $negate);
} }
if ($searchComments) { addChart('content', 'matches', $word, $negate);
addChart('longdesc', 'substring',
$word, $negate);
}
} }
# URL field (for IP addrs, host.names, # URL field (for IP addrs, host.names,
# scheme://urls) # scheme://urls)
......
...@@ -51,10 +51,6 @@ ...@@ -51,10 +51,6 @@
"access the advanced query page. It's in URL parameter " _ "access the advanced query page. It's in URL parameter " _
"format, which makes it hard to read. Sorry!", "format, which makes it hard to read. Sorry!",
quicksearch_comment_cutoff => "The maximum number of search terms for a QuickSearch " _
"to search comments. If the QuickSearch query contains " _
"more terms than this value, QuickSearch will not search comments.",
specific_search_allow_empty_words => "Whether to allow a search on the 'Find a Specific " _ specific_search_allow_empty_words => "Whether to allow a search on the 'Find a Specific " _
"Bug' page with an empty 'Words' field." } "Bug' page with an empty 'Words' field." }
%] %]
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