Module org.elasticsearch.server
Package org.elasticsearch.plugins
Class SearchPlugin.QueryVectorBuilderSpec<T extends QueryVectorBuilder>
java.lang.Object
org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<T,BiFunction<XContentParser,Void,T>>
org.elasticsearch.plugins.SearchPlugin.QueryVectorBuilderSpec<T>
- Enclosing interface:
- SearchPlugin
public static class SearchPlugin.QueryVectorBuilderSpec<T extends QueryVectorBuilder>
extends SearchPlugin.SearchExtensionSpec<T,BiFunction<XContentParser,Void,T>>
Specification of custom
QueryVectorBuilder
.-
Constructor Summary
ConstructorDescriptionQueryVectorBuilderSpec
(String name, Writeable.Reader<T> reader, BiFunction<XContentParser, Void, T> parser) Specification of customQueryVectorBuilder
.QueryVectorBuilderSpec
(ParseField name, Writeable.Reader<T> reader, BiFunction<XContentParser, Void, T> parser) Specification of customQueryVectorBuilder
. -
Method Summary
Methods inherited from class org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec
getName, getParser, getReader
-
Constructor Details
-
QueryVectorBuilderSpec
public QueryVectorBuilderSpec(ParseField name, Writeable.Reader<T> reader, BiFunction<XContentParser, Void, T> parser) Specification of customQueryVectorBuilder
.- Parameters:
name
- holds the names by which this query vector builder 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 builder should use as itsNamedWriteable.getWriteableName()
too.reader
- the reader registered for this query vector builder. Typically a reference to a constructor that takes aStreamInput
parser
- the parser the reads the query vector builder from xcontent
-
QueryVectorBuilderSpec
public QueryVectorBuilderSpec(String name, Writeable.Reader<T> reader, BiFunction<XContentParser, Void, T> parser) Specification of customQueryVectorBuilder
.- Parameters:
name
- the name by which this query vector builder might be parsed or deserialized. Make sure that the query builder returns this name forNamedWriteable.getWriteableName()
.reader
- the reader registered for this query vector builder. Typically a reference to a constructor that takes aStreamInput
parser
- the parser the reads the query vector builder from xcontent
-