Interface QuerySuggester
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
CompoundQuerySuggester,LuceneQuerySuggester,NoopQuerySuggester,QuerySuggesterProxy
public interface QuerySuggester extends AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAXIMUM_RESULTS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddestroy()Destroys any resources created by this suggesterbooleanisReady()longrecordCount()return amount of records indexed into this QuerySuggester.default List<Suggestion>suggest(String term)List<Suggestion>suggest(String term, int maxResults, Set<String> tags)-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Field Detail
-
DEFAULT_MAXIMUM_RESULTS
static final int DEFAULT_MAXIMUM_RESULTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 suggestionsmaxResults- the maximum number of suggestions to returntags- 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
-
-