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 aPipelineAggregationBuilder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested 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 Map<String,Object>metaDataprotected Stringtype-
Fields inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
bucketsPaths, name
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPipelineAggregationBuilder(String name, String type, String[] bucketsPaths)protectedAbstractPipelineAggregationBuilder(StreamInput in, String type)Read from a stream.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PipelineAggregatorcreate()Creates the pipeline aggregatorprotected abstract PipelineAggregatorcreateInternal(Map<String,Object> metaData)voiddoValidate(AggregatorFactory parent, Collection<AggregationBuilder> factories, Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)protected abstract voiddoWriteTo(StreamOutput out)booleanequals(Object obj)StringgetType()The name of the type of aggregation built by this builder.inthashCode()protected abstract XContentBuilderinternalXContent(XContentBuilder builder, ToXContent.Params params)protected booleanoverrideBucketsPath()PABsetMetaData(Map<String,Object> metaData)Associate metadata with thisPipelineAggregationBuilder.XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)Stringtype()voidvalidate(AggregatorFactory parent, Collection<AggregationBuilder> factories, Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)Validates the state of this factory (makes sure the factory is properly configured)static voidvalidateSequentiallyOrderedParentAggs(AggregatorFactory parent, String type, 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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
BUCKETS_PATH_FIELD
public static final ParseField BUCKETS_PATH_FIELD
Field shared by many parsers.
-
type
protected final String type
-
-
Constructor Detail
-
AbstractPipelineAggregationBuilder
protected AbstractPipelineAggregationBuilder(String name, String type, String[] bucketsPaths)
-
AbstractPipelineAggregationBuilder
protected AbstractPipelineAggregationBuilder(StreamInput in, String type) throws IOException
Read from a stream.- Throws:
IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
IOException
-
doWriteTo
protected abstract void doWriteTo(StreamOutput out) throws IOException
- Throws:
IOException
-
type
public String type()
-
validate
public final void validate(AggregatorFactory parent, Collection<AggregationBuilder> factories, 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(Map<String,Object> metaData)
-
create
public final PipelineAggregator create()
Creates the pipeline aggregator- Specified by:
createin classPipelineAggregationBuilder- Returns:
- The created aggregator
-
doValidate
public void doValidate(AggregatorFactory parent, Collection<AggregationBuilder> factories, Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)
-
validateSequentiallyOrderedParentAggs
public static void validateSequentiallyOrderedParentAggs(AggregatorFactory parent, String type, String name)
Validates pipeline aggregations that need sequentially ordered data.
-
setMetaData
public PAB setMetaData(Map<String,Object> metaData)
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 IOException
- Throws:
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 IOException
- Throws:
IOException
-
getType
public String getType()
Description copied from interface:BaseAggregationBuilderThe name of the type of aggregation built by this builder.
-
-