Package org.elasticsearch.plugins
Class SearchPlugin.SuggesterSpec<T extends SuggestionBuilder<T>>
- java.lang.Object
-
- org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<T,CheckedFunction<XContentParser,T,java.io.IOException>>
-
- org.elasticsearch.plugins.SearchPlugin.SuggesterSpec<T>
-
- Enclosing interface:
- SearchPlugin
public static class SearchPlugin.SuggesterSpec<T extends SuggestionBuilder<T>> extends SearchPlugin.SearchExtensionSpec<T,CheckedFunction<XContentParser,T,java.io.IOException>>
Specification for aSuggester
.
-
-
Constructor Summary
Constructors Constructor Description SuggesterSpec(java.lang.String name, Writeable.Reader<T> reader, CheckedFunction<XContentParser,T,java.io.IOException> parser)
Specification of customSuggester
.SuggesterSpec(ParseField name, Writeable.Reader<T> reader, CheckedFunction<XContentParser,T,java.io.IOException> parser)
Specification of customSuggester
.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec
getName, getParser, getReader
-
-
-
-
Constructor Detail
-
SuggesterSpec
public SuggesterSpec(ParseField name, Writeable.Reader<T> reader, CheckedFunction<XContentParser,T,java.io.IOException> parser)
Specification of customSuggester
.- Parameters:
name
- holds the names by which this suggester might be parsed. TheParseField.getPreferredName()
is special as it is the name by under which the reader is registered. So it is the name that the query should use as itsNamedWriteable.getWriteableName()
too.reader
- the reader registered for this suggester's builder. Typically a reference to a constructor that takes aStreamInput
parser
- the parser the reads the query suggester from xcontent
-
SuggesterSpec
public SuggesterSpec(java.lang.String name, Writeable.Reader<T> reader, CheckedFunction<XContentParser,T,java.io.IOException> parser)
Specification of customSuggester
.- Parameters:
name
- the name by which this suggester might be parsed or deserialized. Make sure that the query builder returns this name forNamedWriteable.getWriteableName()
.reader
- the reader registered for this suggester's builder. Typically a reference to a constructor that takes aStreamInput
parser
- the parser the reads the suggester builder from xcontent
-
-