Search API: Autocomplete Method


  • Executes an autocomplete query. Returns a deferred object.


  • query
    • The search term.  Uses simple Lucerne syntax.
  • languageCode
    • The language you want to return results from.  This is the current language of the site by default.  LanguageCode is interpreted from search results using the language meta tag, or from the agility_attributes meta tag that is generated by default in all Agility pages.
    • This must be an exact match.
  • category
    • If your site has the "category" selector setup in the search settings, you can limit results to a particular category string.  
    • This must be an exact match.
  • domain
    • If you have specified multiple domains for your search index, you can filter by the domain here.
    • This must be an exact match.
  • top
    • The number of results to return.
  • fuzzy
    • True/false - indicates where you wish to return exact matches or "fuzzy" matches.


  • success (response)
    • The autocomplete completed successfully.
    • The response parameter is an Array of strings with the autocompleted results.
  • error(message)
    • Indicates that an error occurred, with the relative error message as a parameter.
  • always
    • Indicates that the HTTP request to the search server has completed.


0 out of 0 found this helpful



Please sign in to leave a comment.