Package org.elasticsearch.plugins
Class SearchPlugin.PipelineAggregationSpec
java.lang.Object
org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<PipelineAggregationBuilder,ContextParser<java.lang.String,? extends PipelineAggregationBuilder>>
org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec
- Enclosing interface:
- SearchPlugin
public static class SearchPlugin.PipelineAggregationSpec extends SearchPlugin.SearchExtensionSpec<PipelineAggregationBuilder,ContextParser<java.lang.String,? extends PipelineAggregationBuilder>>
Specification for a
PipelineAggregator
.-
Constructor Summary
-
Method Summary
Modifier and Type Method Description SearchPlugin.PipelineAggregationSpec
addResultReader(java.lang.String writeableName, Writeable.Reader<? extends InternalAggregation> resultReader)
Add a reader for the shard level results of the aggregation.SearchPlugin.PipelineAggregationSpec
addResultReader(Writeable.Reader<? extends InternalAggregation> resultReader)
Add a reader for the shard level results of the aggregation with SearchPlugin.SearchExtensionSpec.getName()'sParseField.getPreferredName()
as theNamedWriteable.getWriteableName()
.Writeable.Reader<? extends PipelineAggregator>
getAggregatorReader()
The reader for thePipelineAggregator
.java.util.Map<java.lang.String,Writeable.Reader<? extends InternalAggregation>>
getResultReaders()
Get the readers that must be registered for this aggregation's results.Methods inherited from class org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec
getName, getParser, getReader
-
Constructor Details
-
PipelineAggregationSpec
public PipelineAggregationSpec(ParseField name, Writeable.Reader<? extends PipelineAggregationBuilder> builderReader, Writeable.Reader<? extends PipelineAggregator> aggregatorReader, ContextParser<java.lang.String,? extends PipelineAggregationBuilder> parser)Specification of aPipelineAggregator
.- Parameters:
name
- holds the names by which this aggregation might be parsed. TheParseField.getPreferredName()
is special as it is the name by under which the readers are registered. So it is the name that thePipelineAggregationBuilder
andPipelineAggregator
should return fromNamedWriteable.getWriteableName()
.builderReader
- the reader registered for this aggregation's builder. Typically a reference to a constructor that takes aStreamInput
aggregatorReader
- reads thePipelineAggregator
from a streamparser
- reads the aggregation builder from XContent
-
PipelineAggregationSpec
public PipelineAggregationSpec(java.lang.String name, Writeable.Reader<? extends PipelineAggregationBuilder> builderReader, Writeable.Reader<? extends PipelineAggregator> aggregatorReader, ContextParser<java.lang.String,? extends PipelineAggregationBuilder> parser)Specification of aPipelineAggregator
.- Parameters:
name
- name by which this aggregation might be parsed or deserialized. Make sure it is the name that thePipelineAggregationBuilder
andPipelineAggregator
should return fromNamedWriteable.getWriteableName()
.builderReader
- the reader registered for this aggregation's builder. Typically a reference to a constructor that takes aStreamInput
aggregatorReader
- reads thePipelineAggregator
from a streamparser
- reads the aggregation builder from XContent
-
PipelineAggregationSpec
@Deprecated public PipelineAggregationSpec(ParseField name, Writeable.Reader<? extends PipelineAggregationBuilder> builderReader, Writeable.Reader<? extends PipelineAggregator> aggregatorReader, PipelineAggregator.Parser parser)Deprecated.prefer the ctor that takes aContextParser
Specification of aPipelineAggregator
.- Parameters:
name
- holds the names by which this aggregation might be parsed. TheParseField.getPreferredName()
is special as it is the name by under which the readers are registered. So it is the name that thePipelineAggregationBuilder
andPipelineAggregator
should return fromNamedWriteable.getWriteableName()
.builderReader
- the reader registered for this aggregation's builder. Typically a reference to a constructor that takes aStreamInput
aggregatorReader
- reads thePipelineAggregator
from a streamparser
- reads the aggregation builder from XContent
-
PipelineAggregationSpec
@Deprecated public PipelineAggregationSpec(java.lang.String name, Writeable.Reader<? extends PipelineAggregationBuilder> builderReader, Writeable.Reader<? extends PipelineAggregator> aggregatorReader, PipelineAggregator.Parser parser)Deprecated.prefer the ctor that takes aContextParser
Specification of aPipelineAggregator
.- Parameters:
name
- name by which this aggregation might be parsed or deserialized. Make sure it is the name that thePipelineAggregationBuilder
andPipelineAggregator
should return fromNamedWriteable.getWriteableName()
.builderReader
- the reader registered for this aggregation's builder. Typically a reference to a constructor that takes aStreamInput
aggregatorReader
- reads thePipelineAggregator
from a stream
-
-
Method Details
-
addResultReader
public SearchPlugin.PipelineAggregationSpec addResultReader(Writeable.Reader<? extends InternalAggregation> resultReader)Add a reader for the shard level results of the aggregation with SearchPlugin.SearchExtensionSpec.getName()'sParseField.getPreferredName()
as theNamedWriteable.getWriteableName()
. -
addResultReader
public SearchPlugin.PipelineAggregationSpec addResultReader(java.lang.String writeableName, Writeable.Reader<? extends InternalAggregation> resultReader)Add a reader for the shard level results of the aggregation. -
getAggregatorReader
The reader for thePipelineAggregator
. -
getResultReaders
public java.util.Map<java.lang.String,Writeable.Reader<? extends InternalAggregation>> getResultReaders()Get the readers that must be registered for this aggregation's results.
-