Class HistogramAggregation

All Implemented Interfaces:
AggregationVariant, PivotGroupByVariant, JsonpSerializable

@JsonpDeserializable public class HistogramAggregation extends BucketAggregationBase implements AggregationVariant, PivotGroupByVariant
See Also:
  • Field Details

  • Method Details

    • of

    • _aggregationKind

      public Aggregation.Kind _aggregationKind()
      Aggregation variant kind.
      Specified by:
      _aggregationKind in interface AggregationVariant
    • _pivotGroupByKind

      public PivotGroupBy.Kind _pivotGroupByKind()
      PivotGroupBy variant kind.
      Specified by:
      _pivotGroupByKind in interface PivotGroupByVariant
    • extendedBounds

      @Nullable public final ExtendedBounds<Double> extendedBounds()
      Enables extending the bounds of the histogram beyond the data itself.

      API name: extended_bounds

    • hardBounds

      @Nullable public final ExtendedBounds<Double> hardBounds()
      Limits the range of buckets in the histogram. It is particularly useful in the case of open data ranges that can result in a very large number of buckets.

      API name: hard_bounds

    • field

      @Nullable public final String field()
      The name of the field to aggregate on.

      API name: field

    • interval

      @Nullable public final Double interval()
      The interval for the buckets. Must be a positive decimal.

      API name: interval

    • minDocCount

      @Nullable public final Integer minDocCount()
      Only returns buckets that have min_doc_count number of documents. By default, the response will fill gaps in the histogram with empty buckets.

      API name: min_doc_count

    • missing

      @Nullable public final Double missing()
      The value to apply to documents that do not have a value. By default, documents without a value are ignored.

      API name: missing

    • offset

      @Nullable public final Double offset()
      By default, the bucket keys start with 0 and then continue in even spaced steps of interval. The bucket boundaries can be shifted by using the offset option.

      API name: offset

    • order

      public final List<NamedValue<SortOrder>> order()
      The sort order of the returned buckets. By default, the returned buckets are sorted by their key ascending.

      API name: order

    • script

      @Nullable public final Script script()
      API name: script
    • format

      @Nullable public final String format()
      API name: format
    • keyed

      @Nullable public final Boolean keyed()
      If true, returns buckets as a hash instead of an array, keyed by the bucket keys.

      API name: keyed

    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Overrides:
      serializeInternal in class AggregationBase
    • setupHistogramAggregationDeserializer

      protected static void setupHistogramAggregationDeserializer(ObjectDeserializer<HistogramAggregation.Builder> op)