Class DateHistogramAggregation

All Implemented Interfaces:
AggregationVariant, PivotGroupByVariant, JsonpSerializable

@JsonpDeserializable public class DateHistogramAggregation 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
    • calendarInterval

      @Nullable public final CalendarInterval calendarInterval()
      Calendar-aware interval. Can be specified using the unit name, such as month, or as a single unit quantity, such as 1M.

      API name: calendar_interval

    • extendedBounds

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

      API name: extended_bounds

    • hardBounds

      @Nullable public final ExtendedBounds<FieldDateMath> hardBounds()
      Limits the histogram to specified bounds.

      API name: hard_bounds

    • field

      @Nullable public final String field()
      The date field whose values are use to build a histogram.

      API name: field

    • fixedInterval

      @Nullable public final Time fixedInterval()
      Fixed intervals: a fixed number of SI units and never deviate, regardless of where they fall on the calendar.

      API name: fixed_interval

    • format

      @Nullable public final String format()
      The date format used to format key_as_string in the response. If no format is specified, the first date format specified in the field mapping is used.

      API name: format

    • interval

      @Deprecated @Nullable public final Time interval()
      Deprecated.
      7.2.0 use fixed_interval or calendar_interval
      API name: interval
    • minDocCount

      @Nullable public final Integer minDocCount()
      Only returns buckets that have min_doc_count number of documents. By default, all buckets between the first bucket that matches documents and the last one are returned.

      API name: min_doc_count

    • missing

      @Nullable public final DateTime 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 Time offset()
      Changes the start value of each bucket by the specified positive (+) or negative offset (-) duration.

      API name: offset

    • order

      public final List<NamedValue<SortOrder>> order()
      The sort order of the returned buckets.

      API name: order

    • params

      public final Map<String,JsonData> params()
      API name: params
    • script

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

      @Nullable public final String timeZone()
      Time zone used for bucketing and rounding. Defaults to Coordinated Universal Time (UTC).

      API name: time_zone

    • keyed

      @Nullable public final Boolean keyed()
      Set to true to associate a unique string key with each bucket and return the ranges as a hash rather than an array.

      API name: keyed

    • serializeInternal

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

      protected static void setupDateHistogramAggregationDeserializer(ObjectDeserializer<DateHistogramAggregation.Builder> op)