From b50c1fe710f1c33d76410dedcf8551c1a1772cba Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 18 May 2015 06:13:13 +0100 Subject: Search completion; do not adapt completion scoring. The relevancy score of completion suggestions should not change as the user continues to type. See "UX Issue 1" in #1651. (The effect of the previous implementation was that search completions would jump, unpredictably, up the suggestion list, often displacing suggestions from other completers for no reason which was apparent to the user.) --- background_scripts/completion.coffee | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'background_scripts/completion.coffee') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 56740efd..1f0a0019 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -456,10 +456,6 @@ class SearchEngineCompleter factor = Math.max 0.0, Math.min 1.0, Settings.get "omniSearchWeight" haveCompletionEngine = (0.0 < factor or custom) and CompletionSearch.haveCompletionEngine searchUrl - # We weight the relevancy factor by the length of the query (exponentially). The idea is that, the - # more the user has typed, the less likely it is that another completer has proven fruitful. - factor *= 1 - Math.pow 0.8, query.length - # This filter is applied to all of the suggestions from all of the completers, after they have been # aggregated by the MultiCompleter. filter = (suggestions) -> @@ -496,9 +492,7 @@ class SearchEngineCompleter highlightTerms: false isCustomSearch: custom relevancyFunction: @computeRelevancy - # We reduce the relevancy factor as suggestions are added. This respects, to some extent, the - # order provided by the completion engine. - relevancyData: factor *= 0.95 + relevancyData: factor cachedSuggestions = if haveCompletionEngine then CompletionSearch.complete searchUrl, queryTerms else null -- cgit v1.2.3