Package org.elasticsearch.plugins
Class SearchPlugin.SearchExtensionSpec<W extends NamedWriteable,P>
- java.lang.Object
-
- org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<W,P>
-
- Type Parameters:
W
- the type of the mainNamedWriteable
for this spec. All specs have this but it isn't always *for* the same thing though, usually it is some sort of builder sent from the coordinating node to the data nodes executing the behaviorP
- the type of the parser for this spec. The parser runs on the coordinating node, convertingXContent
into the behavior to execute
- Direct Known Subclasses:
SearchPlugin.AggregationSpec
,SearchPlugin.PipelineAggregationSpec
,SearchPlugin.QuerySpec
,SearchPlugin.RescorerSpec
,SearchPlugin.ScoreFunctionSpec
,SearchPlugin.SearchExtSpec
,SearchPlugin.SuggesterSpec
- Enclosing interface:
- SearchPlugin
public static class SearchPlugin.SearchExtensionSpec<W extends NamedWriteable,P> extends java.lang.Object
Specification of search time behavior extension like a customMovAvgModel
orScoreFunction
.
-
-
Constructor Summary
Constructors Constructor Description SearchExtensionSpec(java.lang.String name, Writeable.Reader<? extends W> reader, P parser)
Build the spec with a String.SearchExtensionSpec(ParseField name, Writeable.Reader<? extends W> reader, P parser)
Build the spec with a ParseField.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParseField
getName()
The name of the thing being specified as aParseField
.P
getParser()
The parser responsible for convertingXContent
into the behavior.Writeable.Reader<? extends W>
getReader()
The reader responsible for reading the behavior from the internode protocol.
-
-
-
Constructor Detail
-
SearchExtensionSpec
public SearchExtensionSpec(ParseField name, Writeable.Reader<? extends W> reader, P parser)
Build the spec with a ParseField.- Parameters:
name
- the name of the behavior as a ParseField. The parser is registered under all names specified by the ParseField but the reader is only registered under theParseField.getPreferredName()
so be sure that that is the name that W'sNamedWriteable.getWriteableName()
returns.reader
- reader that reads the behavior from the internode protocolparser
- parser that read the behavior from a REST request
-
SearchExtensionSpec
public SearchExtensionSpec(java.lang.String name, Writeable.Reader<? extends W> reader, P parser)
Build the spec with a String.- Parameters:
name
- the name of the behavior. The parser and the reader are are registered under this name so be sure that that is the name that W'sNamedWriteable.getWriteableName()
returns.reader
- reader that reads the behavior from the internode protocolparser
- parser that read the behavior from a REST request
-
-
Method Detail
-
getName
public ParseField getName()
The name of the thing being specified as aParseField
. This allows it to have deprecated names.
-
getReader
public Writeable.Reader<? extends W> getReader()
The reader responsible for reading the behavior from the internode protocol.
-
-