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.SignificanceHeuristicSpec
,SearchPlugin.SuggesterSpec
- Enclosing interface:
- SearchPlugin
Specification of search time behavior extension like a custom
MovAvgModel
or ScoreFunction
.-
Constructor Summary
ConstructorDescriptionSearchExtensionSpec(String name, Writeable.Reader<? extends W> reader, P parser)
Build the spec with a String.SearchExtensionSpec(org.elasticsearch.common.xcontent.ParseField name, Writeable.Reader<? extends W> reader, P parser)
Build the spec with a ParseField. -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.common.xcontent.ParseField
getName()
The name of the thing being specified as aParseField
.The parser responsible for convertingXContent
into the behavior.Writeable.Reader<? extends W>
The reader responsible for reading the behavior from the internode protocol.
-
Constructor Details
-
SearchExtensionSpec
public SearchExtensionSpec(org.elasticsearch.common.xcontent.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
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 Details
-
getName
public org.elasticsearch.common.xcontent.ParseField getName()The name of the thing being specified as aParseField
. This allows it to have deprecated names. -
getReader
The reader responsible for reading the behavior from the internode protocol. -
getParser
The parser responsible for convertingXContent
into the behavior.
-