W
- the type of the main NamedWriteable
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, converting XContent
into the
behavior to executepublic static class SearchPlugin.SearchExtensionSpec<W extends NamedWriteable,P>
extends java.lang.Object
MovAvgModel
or ScoreFunction
.Constructor and Description |
---|
SearchExtensionSpec(ParseField name,
Writeable.Reader<? extends W> reader,
P parser)
Build the spec with a ParseField.
|
SearchExtensionSpec(java.lang.String name,
Writeable.Reader<? extends W> reader,
P parser)
Build the spec with a String.
|
Modifier and Type | Method and Description |
---|---|
ParseField |
getName()
The name of the thing being specified as a
ParseField . |
P |
getParser()
The parser responsible for converting
XContent into the behavior. |
Writeable.Reader<? extends W> |
getReader()
The reader responsible for reading the behavior from the internode protocol.
|
public SearchExtensionSpec(ParseField name, Writeable.Reader<? extends W> reader, P parser)
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 the ParseField.getPreferredName()
so be sure that
that is the name that W's NamedWriteable.getWriteableName()
returns.reader
- reader that reads the behavior from the internode protocolparser
- parser that read the behavior from a REST requestpublic SearchExtensionSpec(java.lang.String name, Writeable.Reader<? extends W> reader, P parser)
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's NamedWriteable.getWriteableName()
returns.reader
- reader that reads the behavior from the internode protocolparser
- parser that read the behavior from a REST requestpublic ParseField getName()
ParseField
. This allows it to have deprecated names.public Writeable.Reader<? extends W> getReader()