         queryTerms: queryTerms
         type: "domain"
         url: domains[0]?[0] ? "" # This is the URL or an empty string, but not null.
-        relevancy: 1
+        relevancy: 2
       ].filter (s) -> 0 < s.url.length
 
   # Returns a list of domains of the form: [ [domain, relevancy], ... ]

#  - refresh(): (optional) refreshes the completer's data source (e.g. refetches the list of bookmarks).
#  - cancel(): (optional) cancels any pending, cancelable action.
class Suggestion
  showRelevancy: true # Set this to true to render relevancy when debugging the ranking scores.

  constructor: (@options) ->
    # Required options.

      type: description
      url: Utils.createSearchUrl queryTerms, searchUrl
      title: queryTerms.join " "
      relevancy: 2
      autoSelect: custom
      forceAutoSelect: custom
      highlightTerms: not haveCompletionEngine

    mkSuggestion = do =>
      count = 0
      (suggestion) =>
        console.log count
        new Suggestion
          queryTerms: queryTerms
          type: description
          url: Utils.createSearchUrl suggestion, searchUrl
          title: suggestion
          insertText: suggestion
          highlightTerms: false
          isCustomSearch: custom
          # The first (top) suggestion gets a score of 1.  This puts it two <Tab>s away if a domain completion
          # is present (which has a score of 2), and one <Tab> away otherwise.
          relevancy: if 0 < count++ then null else 1
          relevancyFunction: @computeRelevancy
          relevancyData: factor

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