Package org.opensearch.search.suggest
Class Suggester<T extends SuggestionSearchContext.SuggestionContext>
java.lang.Object
org.opensearch.search.suggest.Suggester<T>
- Direct Known Subclasses:
CompletionSuggester
,PhraseSuggester
,TermSuggester
@PublicApi(since="1.0.0")
public abstract class Suggester<T extends SuggestionSearchContext.SuggestionContext>
extends Object
Base class used for all suggester implementations
- Opensearch.api:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Suggest.Suggestion
<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> emptySuggestion
(String name, T suggestion, org.apache.lucene.util.CharsRefBuilder spare) Suggest.Suggestion
<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> execute
(String name, T suggestion, org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.util.CharsRefBuilder spare) protected abstract Suggest.Suggestion
<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> innerExecute
(String name, T suggestion, org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.util.CharsRefBuilder spare)
-
Constructor Details
-
Suggester
public Suggester()
-
-
Method Details
-
innerExecute
protected abstract Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> innerExecute(String name, T suggestion, org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.util.CharsRefBuilder spare) throws IOException - Throws:
IOException
-
emptySuggestion
protected abstract Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> emptySuggestion(String name, T suggestion, org.apache.lucene.util.CharsRefBuilder spare) throws IOException - Throws:
IOException
-
execute
public Suggest.Suggestion<? extends Suggest.Suggestion.Entry<? extends Suggest.Suggestion.Entry.Option>> execute(String name, T suggestion, org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.util.CharsRefBuilder spare) throws IOException - Throws:
IOException
-