Class AbstractPipelineAggregationBuilder<PAB extends AbstractPipelineAggregationBuilder<PAB>>
java.lang.Object
org.elasticsearch.search.aggregations.PipelineAggregationBuilder
org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder<PAB>
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment,BaseAggregationBuilder
- Direct Known Subclasses:
BucketMetricsPipelineAggregationBuilder,BucketScriptPipelineAggregationBuilder,BucketSelectorPipelineAggregationBuilder,BucketSortPipelineAggregationBuilder,CumulativeSumPipelineAggregationBuilder,DerivativePipelineAggregationBuilder,MovAvgPipelineAggregationBuilder,MovFnPipelineAggregationBuilder,SerialDiffPipelineAggregationBuilder
public abstract class AbstractPipelineAggregationBuilder<PAB extends AbstractPipelineAggregationBuilder<PAB>> extends PipelineAggregationBuilder
Base implementation of a
PipelineAggregationBuilder.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static ParseFieldBUCKETS_PATH_FIELDField shared by many parsers.protected java.util.Map<java.lang.String,java.lang.Object>metaDataprotected java.lang.StringtypeFields inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
bucketsPaths, name -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPipelineAggregationBuilder(java.lang.String name, java.lang.String type, java.lang.String[] bucketsPaths)protectedAbstractPipelineAggregationBuilder(StreamInput in, java.lang.String type)Read from a stream. -
Method Summary
Modifier and Type Method Description PipelineAggregatorcreate()Creates the pipeline aggregatorprotected abstract PipelineAggregatorcreateInternal(java.util.Map<java.lang.String,java.lang.Object> metaData)voiddoValidate(AggregatorFactory parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)protected abstract voiddoWriteTo(StreamOutput out)booleanequals(java.lang.Object obj)java.lang.StringgetType()The name of the type of aggregation built by this builder.inthashCode()protected abstract XContentBuilderinternalXContent(XContentBuilder builder, ToXContent.Params params)protected booleanoverrideBucketsPath()PABsetMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)Associate metadata with thisPipelineAggregationBuilder.XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)java.lang.Stringtype()voidvalidate(AggregatorFactory parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)Validates the state of this factory (makes sure the factory is properly configured)static voidvalidateSequentiallyOrderedParentAggs(AggregatorFactory parent, java.lang.String type, java.lang.String name)Validates pipeline aggregations that need sequentially ordered data.voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
getBucketsPaths, getName, subAggregations, toString
-
Field Details
-
BUCKETS_PATH_FIELD
Field shared by many parsers. -
type
protected final java.lang.String type -
metaData
protected java.util.Map<java.lang.String,java.lang.Object> metaData
-
-
Constructor Details
-
AbstractPipelineAggregationBuilder
protected AbstractPipelineAggregationBuilder(java.lang.String name, java.lang.String type, java.lang.String[] bucketsPaths) -
AbstractPipelineAggregationBuilder
protected AbstractPipelineAggregationBuilder(StreamInput in, java.lang.String type) throws java.io.IOExceptionRead from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
java.io.IOException
-
doWriteTo
- Throws:
java.io.IOException
-
type
public java.lang.String type() -
validate
public final void validate(AggregatorFactory parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)Validates the state of this factory (makes sure the factory is properly configured)- Specified by:
validatein classPipelineAggregationBuilder
-
createInternal
protected abstract PipelineAggregator createInternal(java.util.Map<java.lang.String,java.lang.Object> metaData) -
create
Creates the pipeline aggregator- Specified by:
createin classPipelineAggregationBuilder- Returns:
- The created aggregator
-
doValidate
public void doValidate(AggregatorFactory parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories) -
validateSequentiallyOrderedParentAggs
public static void validateSequentiallyOrderedParentAggs(AggregatorFactory parent, java.lang.String type, java.lang.String name)Validates pipeline aggregations that need sequentially ordered data. -
setMetaData
Description copied from class:PipelineAggregationBuilderAssociate metadata with thisPipelineAggregationBuilder.- Specified by:
setMetaDatain interfaceBaseAggregationBuilder- Specified by:
setMetaDatain classPipelineAggregationBuilder
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-
overrideBucketsPath
protected boolean overrideBucketsPath()- Returns:
trueif theAbstractPipelineAggregationBuilderoverrides the XContent rendering of the bucketPath option.
-
internalXContent
protected abstract XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
getType
public java.lang.String getType()Description copied from interface:BaseAggregationBuilderThe name of the type of aggregation built by this builder.
-