From 1fae328339e87567db7d7d0bec08fa482fca2286 Mon Sep 17 00:00:00 2001 From: Zachary-hub <201104966qwe@gmail.com> Date: Sat, 11 Oct 2025 05:42:22 +1100 Subject: [PATCH 1/2] ESQL docs: clarify duration aliases (minute vs month), case-insensitive & optional whitespace Relates: elastic/elasticsearch#135552 --- .../query-languages/esql/esql-time-spans.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/reference/query-languages/esql/esql-time-spans.md b/docs/reference/query-languages/esql/esql-time-spans.md index e9da009e7deff..3c0e71e0c5805 100644 --- a/docs/reference/query-languages/esql/esql-time-spans.md +++ b/docs/reference/query-languages/esql/esql-time-spans.md @@ -110,17 +110,30 @@ POST /_query ``` +### Duration units and matching rules + +Duration literals can be written with or without a space between the number and the unit +(for example, `1m` is equivalent to `1 m`). Matching is **case-insensitive**. + ## Supported temporal units [esql-time-spans-table] | Temporal Units | Valid Abbreviations | | --- | --- | | year | y, yr, years | | quarter | q, quarters | -| month | mo, months | +| month | m, mm, month, months | | week | w, weeks | | day | d, days | | hour | h, hours | -| minute | min, minutes | +| minute | min, mi, n, minute, minutes | | second | s, sec, seconds | | millisecond | ms, milliseconds | +**Examples** + +```esql +FROM t | WHERE date_col > NOW() - 1m // month (same as: 1 m) +FROM t | WHERE ts > NOW() - 1mi // minute +FROM t | WHERE ts > NOW() - 1n // minute +FROM t | WHERE ts > NOW() - 500ms // millisecond +``` From 54030ab7cddd7f54bce7813783f9d04997c401a1 Mon Sep 17 00:00:00 2001 From: Zachary-hub <201104966qwe@gmail.com> Date: Sat, 11 Oct 2025 18:29:20 +1100 Subject: [PATCH 2/2] Add changelog: 136426 --- docs/changelog/136426.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/changelog/136426.yaml diff --git a/docs/changelog/136426.yaml b/docs/changelog/136426.yaml new file mode 100644 index 0000000000000..a66a81af6b028 --- /dev/null +++ b/docs/changelog/136426.yaml @@ -0,0 +1,6 @@ +summary: "Docs: clarify ESQL time span alias rules (month m/mm vs minute min/mi/n), note case-insensitive matching and optional whitespace, and add unambiguous examples." +area: ES|QL +type: docs +issues: + - 135552 +pr: 136426