Package org.elasticsearch.plugins
Class SearchPlugin.QuerySpec<T extends QueryBuilder>
java.lang.Object
org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<T,QueryParser<T>>
org.elasticsearch.plugins.SearchPlugin.QuerySpec<T>
- Enclosing interface:
- SearchPlugin
public static class SearchPlugin.QuerySpec<T extends QueryBuilder>
extends SearchPlugin.SearchExtensionSpec<T,QueryParser<T>>
Specification of custom
Query
.-
Constructor Summary
ConstructorDescriptionQuerySpec(String name, Writeable.Reader<T> reader, QueryParser<T> parser)
Specification of customQuery
.QuerySpec(org.elasticsearch.common.xcontent.ParseField name, Writeable.Reader<T> reader, QueryParser<T> parser)
Specification of customQuery
. -
Method Summary
Methods inherited from class org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec
getName, getParser, getReader
-
Constructor Details
-
QuerySpec
public QuerySpec(org.elasticsearch.common.xcontent.ParseField name, Writeable.Reader<T> reader, QueryParser<T> parser)Specification of customQuery
.- Parameters:
name
- holds the names by which this query 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 query's builder. Typically a reference to a constructor that takes aStreamInput
parser
- the parser the reads the query builder from xcontent
-
QuerySpec
Specification of customQuery
.- Parameters:
name
- the name by which this query might be parsed or deserialized. Make sure that the query builder returns this name forNamedWriteable.getWriteableName()
.reader
- the reader registered for this query's builder. Typically a reference to a constructor that takes aStreamInput
parser
- the parser the reads the query builder from xcontent
-