From def519ea703be785ef50e8138900a899f47174d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Mon, 6 Apr 2020 17:02:38 +0200 Subject: [PATCH] [Docs] Correct date rounding example for `range` query (#51524) Looking into #50237 I realized that two of the examples given in the documentation around date math rounding for range queries on date fields using `gt` and `lt` is slightly off by a nanosecond. This PR changes this to the bounds that are currently parsed using these parameters. --- docs/reference/query-dsl/range-query.asciidoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/reference/query-dsl/range-query.asciidoc b/docs/reference/query-dsl/range-query.asciidoc index f98eef9ee05..a1906b76973 100644 --- a/docs/reference/query-dsl/range-query.asciidoc +++ b/docs/reference/query-dsl/range-query.asciidoc @@ -176,10 +176,10 @@ GET /_search `gt`:: + -- -Rounds up to the lastest millisecond. +Rounds up to the first millisecond not covered by the rounded date. -For example, `2014-11-18||/M` rounds up to `2014-11-30T23:59:59.999`, excluding -the entire month. +For example, `2014-11-18||/M` rounds up to `2014-12-01T00:00:00.000`, excluding +the entire month of November. -- `gte`:: @@ -187,23 +187,23 @@ the entire month. -- Rounds down to the first millisecond. -For example, `2014-11-18||/M` rounds down to `2014-11-01`, including +For example, `2014-11-18||/M` rounds down to `2014-11-01T00:00:00.000`, including the entire month. -- `lt`:: + -- -Rounds down to the first millisecond. +Rounds down to the last millisecond before the rounded value. -For example, `2014-11-18||/M` rounds down to `2014-11-01`, excluding -the entire month. +For example, `2014-11-18||/M` rounds down to `2014-10-31T23:59:59.999`, excluding +the entire month of November. -- `lte`:: + -- -Rounds up to the latest millisecond. +Rounds up to the latest millisecond in the rounding interval. For example, `2014-11-18||/M` rounds up to `2014-11-30T23:59:59.999`, including the entire month.