Skip to content

Commit def519e

Browse files
author
Christoph Büscher
committed
[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.
1 parent 816fec7 commit def519e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/reference/query-dsl/range-query.asciidoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,34 +176,34 @@ GET /_search
176176
`gt`::
177177
+
178178
--
179-
Rounds up to the lastest millisecond.
179+
Rounds up to the first millisecond not covered by the rounded date.
180180

181-
For example, `2014-11-18||/M` rounds up to `2014-11-30T23:59:59.999`, excluding
182-
the entire month.
181+
For example, `2014-11-18||/M` rounds up to `2014-12-01T00:00:00.000`, excluding
182+
the entire month of November.
183183
--
184184

185185
`gte`::
186186
+
187187
--
188188
Rounds down to the first millisecond.
189189

190-
For example, `2014-11-18||/M` rounds down to `2014-11-01`, including
190+
For example, `2014-11-18||/M` rounds down to `2014-11-01T00:00:00.000`, including
191191
the entire month.
192192
--
193193

194194
`lt`::
195195
+
196196
--
197-
Rounds down to the first millisecond.
197+
Rounds down to the last millisecond before the rounded value.
198198

199-
For example, `2014-11-18||/M` rounds down to `2014-11-01`, excluding
200-
the entire month.
199+
For example, `2014-11-18||/M` rounds down to `2014-10-31T23:59:59.999`, excluding
200+
the entire month of November.
201201
--
202202

203203
`lte`::
204204
+
205205
--
206-
Rounds up to the latest millisecond.
206+
Rounds up to the latest millisecond in the rounding interval.
207207

208208
For example, `2014-11-18||/M` rounds up to `2014-11-30T23:59:59.999`, including
209209
the entire month.

0 commit comments

Comments
 (0)