Interface QuerySuggester

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
CompoundQuerySuggester, GroupingSuggester, LuceneQuerySuggester, NoopQuerySuggester, QuerySuggesterProxy

public interface QuerySuggester extends AutoCloseable
  • Field Details

  • Method Details

    • suggest

      default List<Suggestion> suggest(String term) throws SuggestException
      Parameters:
      term - the term for which to get suggestions
      Returns:
      A list of suggestions for the given term. At most 10 results will be returned
      Throws:
      SuggestException
    • suggest

      List<Suggestion> suggest(String term, int maxResults, Set<String> tags) throws SuggestException
      Parameters:
      term - the term for which to get suggestions
      maxResults - the maximum number of suggestions to return
      tags - the group names used for filtering
      Returns:
      A list of suggestions for the given term
      Throws:
      SuggestException
    • recordCount

      long recordCount()
      return amount of records indexed into this QuerySuggester.
      Returns:
      amount of indexed records
    • isReady

      boolean isReady()
      Returns:
      true if ready to serve suggestions
    • destroy

      default void destroy()
      Destroys any resources created by this suggester