The Open API specification for Synapse is now available for download!

Download Open API Spec

DateHistogramAggregation

org.sagebionetworks.repo.model.search.dsl.DateHistogramAggregation

A date_histogram bucket aggregation over a date column. Must specify extended_bounds or hard_bounds so the bucket count is bounded.

Field Type Description
keyed BOOLEAN Optional. Whether to return buckets as a keyed object rather than an array.
extended_bounds ExtendedBounds Min/max bounds that force a histogram or date_histogram to emit buckets across the full range (used as extended_bounds or hard_bounds). Bounding the range is what caps the bucket count.
hard_bounds ExtendedBounds Min/max bounds that force a histogram or date_histogram to emit buckets across the full range (used as extended_bounds or hard_bounds). Bounding the range is what caps the bucket count.
field STRING Required. The date column to bucket.
calendar_interval STRING Optional. Calendar-aware interval (e.g. month, year). Mutually exclusive with fixed_interval.
fixed_interval STRING Optional. Fixed-duration interval (e.g. 30d, 12h). Mutually exclusive with calendar_interval.
interval STRING Optional. Legacy interval (use calendar_interval / fixed_interval instead).
min_doc_count INTEGER Optional. Minimum document count for a bucket to be returned.
offset STRING Optional. Shifts bucket boundaries by this duration.
time_zone STRING Optional. UTC offset or IANA zone used to compute bucket boundaries.
order OBJECT Optional. Bucket sort order — a {metric: "asc|desc"} object or an array of them.
missing OBJECT Optional. Bucket value assigned to documents missing field.
format STRING Optional. Date format applied to the bucket key in the response.