Skip to content

Commit 0a08a4b

Browse files
author
Christoph Büscher
committed
Document time unit limitations for date histograms (#30177)
Adding some allowed abbreviated values for intervals in date histograms as well as documenting the limitations of intervals larger than days. Closes #23294
1 parent 6aeb2b8 commit 0a08a4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/reference/aggregations/bucket/datehistogram-aggregation.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ POST /sales/_search?size=0
2727
// CONSOLE
2828
// TEST[setup:sales]
2929

30-
Available expressions for interval: `year`, `quarter`, `month`, `week`, `day`, `hour`, `minute`, `second`
30+
Available expressions for interval: `year` (`1y`), `quarter` (`1q`), `month` (`1M`), `week` (`1w`),
31+
`day` (`1d`), `hour` (`1h`), `minute` (`1m`), `second` (`1s`)
3132

3233
Time values can also be specified via abbreviations supported by <<time-units,time units>> parsing.
3334
Note that fractional time values are not supported, but you can address this by shifting to another
34-
time unit (e.g., `1.5h` could instead be specified as `90m`).
35+
time unit (e.g., `1.5h` could instead be specified as `90m`). Also note that time intervals larger than
36+
than days do not support arbitrary values but can only be one unit large (e.g. `1y` is valid, `2y` is not).
3537

3638
[source,js]
3739
--------------------------------------------------

0 commit comments

Comments
 (0)