Skip to content

Commit

Permalink
[Docs] Correct date rounding example for range query (#51524)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Christoph Büscher committed Apr 6, 2020
1 parent fa975d0 commit 2a46850
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/reference/query-dsl/range-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -171,34 +171,34 @@ 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`::
+
--
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.
Expand Down

0 comments on commit 2a46850

Please sign in to comment.