From 21895866c43c09caff096ba2ef5503ee220bab73 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 10 May 2015 20:15:39 +0100 Subject: Search completion; minor changes to comments. --- background_scripts/completion.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 3ddb21d2..d0058538 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -360,6 +360,7 @@ class SearchEngineCompleter cancel: -> CompletionSearch.cancel() + # Look up the search engine and, if one is found, then note it and remove its keyword from the query terms. triageRequest: (request) -> @searchEngines.use (engines) => { queryTerms, query } = request @@ -501,9 +502,10 @@ class MultiCompleter return @mostRecentQuery = arguments if @filterInProgress # Provide each completer with an opportunity to see (and possibly alter) the request before it is - # launched. - for completer in @completers - completer.triageRequest? request + # launched. This is primarily for SearchEngineCompleter, which notes a search query and removes any + # keyword from the queryTerms. Then, other completers don't include keywords in their matching and + # relevancy scores. + completer.triageRequest? request for completer in @completers RegexpCache.clear() { queryTerms } = request -- cgit v1.2.3