diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-03-07 23:47:36 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-05-24 20:24:54 +0200 |
commit | 50fc9d77128db4f8565265047166c6ef61bac5c5 (patch) | |
tree | eadc23eeaca476412e36c63161f5a2e4ab96aabd /Bugzilla/Search/Quicksearch.pm | |
parent | 0ea91b298e8fc1c439f42c9288247e9223ce552e (diff) | |
download | bugzilla-50fc9d77128db4f8565265047166c6ef61bac5c5.tar.gz bugzilla-50fc9d77128db4f8565265047166c6ef61bac5c5.tar.xz |
Bug 1307485 - Add code to run a subset of buglist.cgi search queries against the ES backend
Diffstat (limited to 'Bugzilla/Search/Quicksearch.pm')
-rw-r--r-- | Bugzilla/Search/Quicksearch.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Search/Quicksearch.pm b/Bugzilla/Search/Quicksearch.pm index 4f11a3f54..462a9ba85 100644 --- a/Bugzilla/Search/Quicksearch.pm +++ b/Bugzilla/Search/Quicksearch.pm @@ -127,7 +127,7 @@ use constant COMPONENT_EXCEPTIONS => ( ); # Quicksearch-wide globals for boolean charts. -our ($chart, $and, $or, $fulltext, $bug_status_set); +our ($chart, $and, $or, $fulltext, $bug_status_set, $ELASTIC); sub quicksearch { my ($searchstring) = (@_); @@ -587,7 +587,8 @@ sub _default_quicksearch_word { addChart('alias', 'substring', $word, $negate); addChart('short_desc', 'substring', $word, $negate); addChart('status_whiteboard', 'substring', $word, $negate); - addChart('content', 'matches', _matches_phrase($word), $negate) if $fulltext; + addChart('longdesc', 'substring', $word, $negate) if $ELASTIC; + addChart('content', 'matches', _matches_phrase($word), $negate) if $fulltext && !$ELASTIC; # BMO Bug 664124 - Include the crash signature (sig:) field in default quicksearches addChart('cf_crash_signature', 'substring', $word, $negate); @@ -617,6 +618,7 @@ sub _handle_urls { # Quote and escape a phrase appropriately for a "content matches" search. sub _matches_phrase { my ($phrase) = @_; + return $phrase if $ELASTIC; $phrase =~ s/"/\\"/g; return "\"$phrase\""; } |