diff options
| author | Stephen Blott | 2015-05-18 06:13:13 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-05-18 06:13:18 +0100 | 
| commit | b50c1fe710f1c33d76410dedcf8551c1a1772cba (patch) | |
| tree | bf3f3fe29dfeb642ab73153a098ebbd4d2e64cae /background_scripts/completion.coffee | |
| parent | 8aa6073aebb7dea9d11aba1d0d07c89b161c508c (diff) | |
| download | vimium-b50c1fe710f1c33d76410dedcf8551c1a1772cba.tar.bz2 | |
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.)
Diffstat (limited to 'background_scripts/completion.coffee')
| -rw-r--r-- | background_scripts/completion.coffee | 8 | 
1 files changed, 1 insertions, 7 deletions
| 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 | 
