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, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment, Rewriteable<PipelineAggregationBuilder>, 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.
  • Field Details

    • BUCKETS_PATH_FIELD

      public static final org.elasticsearch.common.ParseField 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

  • Method Details

    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Throws:
      java.io.IOException
    • doWriteTo

      protected abstract void doWriteTo​(StreamOutput out) throws java.io.IOException
      Throws:
      java.io.IOException
    • type

      public java.lang.String type()
    • createInternal

      protected abstract PipelineAggregator createInternal​(java.util.Map<java.lang.String,​java.lang.Object> metadata)
    • create

      public final PipelineAggregator create()
      Creates the pipeline aggregator
      Specified by:
      create in class PipelineAggregationBuilder
      Returns:
      The created aggregator
    • setMetadata

      public PAB setMetadata​(java.util.Map<java.lang.String,​java.lang.Object> metadata)
      Description copied from class: PipelineAggregationBuilder
      Associate metadata with this PipelineAggregationBuilder.
      Specified by:
      setMetadata in interface BaseAggregationBuilder
      Specified by:
      setMetadata in class PipelineAggregationBuilder
    • toXContent

      public final org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Throws:
      java.io.IOException
    • overrideBucketsPath

      protected boolean overrideBucketsPath()
      Returns:
      true if the AbstractPipelineAggregationBuilder overrides the XContent rendering of the bucketPath option.
    • internalXContent

      protected abstract org.elasticsearch.common.xcontent.XContentBuilder internalXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Throws:
      java.io.IOException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • getType

      public java.lang.String getType()
      Description copied from interface: BaseAggregationBuilder
      The name of the type of aggregation built by this builder.