OpenSearch/docs/reference/aggregations/bucket
Zachary Tong 6ae6f57d39
[7.x Backport] Force selection of calendar or fixed intervals (#41906)
The date_histogram accepts an interval which can be either a calendar
interval (DST-aware, leap seconds, arbitrary length of months, etc) or
fixed interval (strict multiples of SI units). Unfortunately this is inferred
by first trying to parse as a calendar interval, then falling back to fixed
if that fails.

This leads to confusing arrangement where `1d` == calendar, but
`2d` == fixed.  And if you want a day of fixed time, you have to
specify `24h` (e.g. the next smallest unit).  This arrangement is very
error-prone for users.

This PR adds `calendar_interval` and `fixed_interval` parameters to any
code that uses intervals (date_histogram, rollup, composite, datafeed, etc).
Calendar only accepts calendar intervals, fixed accepts any combination of
units (meaning `1d` can be used to specify `24h` in fixed time), and both
are mutually exclusive.

The old interval behavior is deprecated and will throw a deprecation warning.
It is also mutually exclusive with the two new parameters. In the future the
old dual-purpose interval will be removed.

The change applies to both REST and java clients.
2019-05-20 12:07:29 -04:00
..
adjacency-matrix-aggregation.asciidoc Use new bulk API endpoint in the docs (#37698) 2019-01-23 09:46:28 +01:00
autodatehistogram-aggregation.asciidoc Fix intervals section of auto date-histogram docs (#41203) 2019-04-15 11:28:12 -04:00
children-aggregation.asciidoc Remove more include_type_name and types from docs (#37601) 2019-01-18 14:11:18 +01:00
composite-aggregation.asciidoc [7.x Backport] Force selection of calendar or fixed intervals (#41906) 2019-05-20 12:07:29 -04:00
datehistogram-aggregation.asciidoc [7.x Backport] Force selection of calendar or fixed intervals (#41906) 2019-05-20 12:07:29 -04:00
daterange-aggregation.asciidoc [DOCS] Fixes callout for Asciidoctor migration (#41127) 2019-04-11 12:06:10 -07:00
diversified-sampler-aggregation.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
filter-aggregation.asciidoc Update filter-aggregation.asciidoc (#24138) 2017-04-17 18:46:13 -04:00
filters-aggregation.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
geodistance-aggregation.asciidoc Remove more include_type_name and types from docs (#37601) 2019-01-18 14:11:18 +01:00
geohashgrid-aggregation.asciidoc Remove more include_type_name and types from docs (#37601) 2019-01-18 14:11:18 +01:00
geotilegrid-aggregation.asciidoc geotile_grid implementation (#37842) 2019-01-31 19:11:30 -05:00
global-aggregation.asciidoc CONSOLE-ify global-aggregation.asciidoc 2017-01-20 14:36:51 -05:00
histogram-aggregation.asciidoc [DOC] Fix mathematical representation on interval (range) (#27450) 2017-11-21 17:06:26 +00:00
iprange-aggregation.asciidoc Ensure that ip_range aggregations always return bucket keys. (#30701) 2018-05-24 08:55:14 -07:00
missing-aggregation.asciidoc CONSOLEify some more aggregation docs 2017-05-16 17:25:24 -04:00
nested-aggregation.asciidoc Remove `include_type_name` in asciidoc where possible (#37568) 2019-01-18 09:34:11 +01:00
parent-aggregation.asciidoc Remove more include_type_name and types from docs (#37601) 2019-01-18 14:11:18 +01:00
range-aggregation.asciidoc [Docs] Convert remaining code snippets in docs (#26422) 2017-08-30 12:11:10 +02:00
reverse-nested-aggregation.asciidoc Remove `include_type_name` in asciidoc where possible (#37568) 2019-01-18 09:34:11 +01:00
sampler-aggregation.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
significantterms-aggregation.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
significanttext-aggregation.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
terms-aggregation.asciidoc Use the breadth first collection mode for significant terms aggs. (#29042) 2019-04-11 15:56:02 -07:00