     factor = Math.max 0.0, Math.min 1.0, Settings.get "omniSearchWeight"
     haveCompletionEngine = (0.0 < factor or custom) and CompletionSearch.haveCompletionEngine searchUrl
 
-    # Relevancy:
-    #   - Relevancy does not depend upon the actual suggestion (so, it does not depend upon word
-    #     relevancy, say).  We assume that the completion engine has already factored that in.  Also,
-    #     completion engines sometimes handle spelling mistakes, in which case we wouldn't find the query
-    #     terms in the suggestion anyway.
-    #   - Scores are weighted such that they retain the order provided by the completion engine.
-    #   - The relavancy is higher if the query term is longer.  The idea is that search suggestions are more
-    #     likely to be relevant if, after typing some number of characters, the user hasn't yet found
-    #     a useful suggestion from another completer.
-    #
-    characterCount = query.length - queryTerms.length + 1
-    relevancy = (if custom then 0.5 else factor) * 12.0 / Math.max 12.0, characterCount
+    # We weight the relevancy-score factor by the length of the query (exponentially).  The idea is that, the
+    # more the user has typed, the less likely it is that what the user is searching for is amonst the
+    # suggestions from other completers.
+    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.

      forceAutoSelect: custom
      highlightTerms: not haveCompletionEngine

    mkSuggestion = (suggestion) ->
      new Suggestion
        queryTerms: queryTerms
        type: description
        url: Utils.createSearchUrl suggestion, searchUrl
        title: suggestion
        relevancy: relevancy *= 0.9
        insertText: suggestion
        highlightTerms: false

    cachedSuggestions =
      if haveCompletionEngine then CompletionSearch.complete searchUrl, queryTerms else null

      onComplete suggestions,
        filter: filter
        continuation: (suggestions, onComplete) =>
          CompletionSearch.complete searchUrl, queryTerms, (suggestions = []) =>
            console.log "fetched suggestions:", suggestions.length, query if SearchEngineCompleter.debug
            onComplete suggestions.map mkSuggestion

  computeRelevancy: ({ relevancyData, queryTerms, title }) ->
    # Tweaks:
    # - Calibration: we boost relevancy scores to try to achieve an appropriate balance between relevancy
    #   scores here, and those provided by other completers.
    # - Relevancy depends only on the title (which is the search terms), and not on the URL.
    Suggestion.boostRelevancyScore 0.5,
      relevancyData * RankingUtils.wordRelevancy queryTerms, title, title

# A completer which calls filter() on many completers, aggregates the results, ranks them, and returns the top
# 10. All queries from the vomnibar come through a multi completer.
