Class DateHistogramAggregation
java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase
co.elastic.clients.elasticsearch._types.aggregations.DateHistogramAggregation
- All Implemented Interfaces:
AggregationVariant
,PivotGroupByVariant
,JsonpSerializable
@JsonpDeserializable
public class DateHistogramAggregation
extends BucketAggregationBase
implements AggregationVariant, PivotGroupByVariant
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase
BucketAggregationBase.AbstractBuilder<BuilderT extends BucketAggregationBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<DateHistogramAggregation>
Json deserializer forDateHistogramAggregation
-
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind.PivotGroupBy variant kind.final CalendarInterval
Calendar-aware interval.final ExtendedBounds<FieldDateMath>
Enables extending the bounds of the histogram beyond the data itself.final String
field()
The date field whose values are use to build a histogram.final Time
Fixed intervals: a fixed number of SI units and never deviate, regardless of where they fall on the calendar.final String
format()
The date format used to formatkey_as_string
in the response.final ExtendedBounds<FieldDateMath>
Limits the histogram to specified bounds.final Time
interval()
Deprecated.final Boolean
keyed()
Set totrue
to associate a unique string key with each bucket and return the ranges as a hash rather than an array.final Integer
Only returns buckets that havemin_doc_count
number of documents.final DateTime
missing()
The value to apply to documents that do not have a value.static DateHistogramAggregation
final Time
offset()
Changes the start value of each bucket by the specified positive (+
) or negative offset (-
) duration.final List<NamedValue<SortOrder>>
order()
The sort order of the returned buckets.params()
API name:params
final Script
script()
API name:script
protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final String
timeZone()
Time zone used for bucketing and rounding.Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase
setupBucketAggregationBaseDeserializer
Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase
meta, name, serialize, setupAggregationBaseDeserializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch._types.aggregations.AggregationVariant
_toAggregation
Methods inherited from interface co.elastic.clients.elasticsearch.transform.PivotGroupByVariant
_toPivotGroupBy
-
Field Details
-
_DESERIALIZER
Json deserializer forDateHistogramAggregation
-
-
Method Details
-
of
public static DateHistogramAggregation of(Function<DateHistogramAggregation.Builder, ObjectBuilder<DateHistogramAggregation>> fn) -
_aggregationKind
Aggregation variant kind.- Specified by:
_aggregationKind
in interfaceAggregationVariant
-
_pivotGroupByKind
PivotGroupBy variant kind.- Specified by:
_pivotGroupByKind
in interfacePivotGroupByVariant
-
calendarInterval
Calendar-aware interval. Can be specified using the unit name, such asmonth
, or as a single unit quantity, such as1M
.API name:
calendar_interval
-
extendedBounds
Enables extending the bounds of the histogram beyond the data itself.API name:
extended_bounds
-
hardBounds
Limits the histogram to specified bounds.API name:
hard_bounds
-
field
The date field whose values are use to build a histogram.API name:
field
-
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
The date format used to formatkey_as_string
in the response. If noformat
is specified, the first date format specified in the field mapping is used.API name:
format
-
interval
Deprecated.7.2.0 usefixed_interval
orcalendar_interval
API name:interval
-
minDocCount
Only returns buckets that havemin_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
The value to apply to documents that do not have a value. By default, documents without a value are ignored.API name:
missing
-
offset
Changes the start value of each bucket by the specified positive (+
) or negative offset (-
) duration.API name:
offset
-
order
The sort order of the returned buckets.API name:
order
-
params
API name:params
-
script
API name:script
-
timeZone
Time zone used for bucketing and rounding. Defaults to Coordinated Universal Time (UTC).API name:
time_zone
-
keyed
Set totrue
to associate a unique string key with each bucket and return the ranges as a hash rather than an array.API name:
keyed
-
serializeInternal
- Overrides:
serializeInternal
in classAggregationBase
-
setupDateHistogramAggregationDeserializer
protected static void setupDateHistogramAggregationDeserializer(ObjectDeserializer<DateHistogramAggregation.Builder> op)
-
fixed_interval
orcalendar_interval