Package org.elasticsearch.plugins
Class SearchPlugin.PipelineAggregationSpec
- java.lang.Object
-
- org.elasticsearch.plugins.SearchPlugin.SearchExtensionSpec<PipelineAggregationBuilder,PipelineAggregator.Parser>
-
- org.elasticsearch.plugins.SearchPlugin.PipelineAggregationSpec
-
- Enclosing interface:
- SearchPlugin
public static class SearchPlugin.PipelineAggregationSpec extends SearchPlugin.SearchExtensionSpec<PipelineAggregationBuilder,PipelineAggregator.Parser>
Specification for aPipelineAggregator
.
-
-
Constructor Summary
Constructors Constructor Description PipelineAggregationSpec(java.lang.String name, Writeable.Reader<? extends PipelineAggregationBuilder> builderReader, Writeable.Reader<? extends PipelineAggregator> aggregatorReader, PipelineAggregator.Parser parser)
Specification of aPipelineAggregator
.PipelineAggregationSpec(ParseField name, Writeable.Reader<? extends PipelineAggregationBuilder> builderReader, Writeable.Reader<? extends PipelineAggregator> aggregatorReader, PipelineAggregator.Parser parser)
Specification of aPipelineAggregator
.
-
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 Detail
-
PipelineAggregationSpec
public PipelineAggregationSpec(ParseField name, Writeable.Reader<? extends PipelineAggregationBuilder> builderReader, Writeable.Reader<? extends PipelineAggregator> aggregatorReader, PipelineAggregator.Parser 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, PipelineAggregator.Parser 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
-
-
Method Detail
-
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
public Writeable.Reader<? extends PipelineAggregator> 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.
-
-