Module org.elasticsearch.server
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,VersionedNamedWriteable,Writeable,Rewriteable<PipelineAggregationBuilder>,BaseAggregationBuilder,ToXContent,ToXContentFragment
- Direct Known Subclasses:
BucketMetricsPipelineAggregationBuilder,BucketScriptPipelineAggregationBuilder,CumulativeSumPipelineAggregationBuilder,MovAvgPipelineAggregationBuilder,SerialDiffPipelineAggregationBuilder
public abstract class AbstractPipelineAggregationBuilder<PAB extends AbstractPipelineAggregationBuilder<PAB>>
extends PipelineAggregationBuilder
Base implementation of a
PipelineAggregationBuilder.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
PipelineAggregationBuilder.ValidationContextNested classes/interfaces inherited from interface org.elasticsearch.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
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldField shared by many parsers.protected final StringFields inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
bucketsPaths, nameFields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDSFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPipelineAggregationBuilder(String name, String type, String[] bucketsPaths) protectedRead from a stream. -
Method Summary
Modifier and TypeMethodDescriptionfinal PipelineAggregatorcreate()Creates the pipeline aggregatorprotected abstract PipelineAggregatorcreateInternal(Map<String, Object> metadata) protected abstract voiddoWriteTo(StreamOutput out) booleangetType()The name of the type of aggregation built by this builder.inthashCode()protected abstract XContentBuilderinternalXContent(XContentBuilder builder, ToXContent.Params params) protected booleansetMetadata(Map<String, Object> metadata) Associate metadata with thisPipelineAggregationBuilder.final XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
getBucketsPaths, getName, rewrite, subAggregations, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragmentMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
getMinimalSupportedVersion, getWriteableName
-
Field Details
-
BUCKETS_PATH_FIELD
Field shared by many parsers. -
type
-
metadata
-
-
Constructor Details
-
AbstractPipelineAggregationBuilder
-
AbstractPipelineAggregationBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
IOException
-
doWriteTo
- Throws:
IOException
-
createInternal
-
create
Creates the pipeline aggregator- Specified by:
createin classPipelineAggregationBuilder- Returns:
- The created aggregator
-
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 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
-
hashCode
public int hashCode() -
equals
-
getType
Description copied from interface:BaseAggregationBuilderThe name of the type of aggregation built by this builder.
-