Skip to content

Commit 2a46850

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 fa975d0 commit 2a46850

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
@@ -171,34 +171,34 @@ GET /_search
171171
`gt`::
172172
+
173173
--
174-
Rounds up to the lastest millisecond.
174+
Rounds up to the first millisecond not covered by the rounded date.
175175

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

180180
`gte`::
181181
+
182182
--
183183
Rounds down to the first millisecond.
184184

185-
For example, `2014-11-18||/M` rounds down to `2014-11-01`, including
185+
For example, `2014-11-18||/M` rounds down to `2014-11-01T00:00:00.000`, including
186186
the entire month.
187187
--
188188

189189
`lt`::
190190
+
191191
--
192-
Rounds down to the first millisecond.
192+
Rounds down to the last millisecond before the rounded value.
193193

194-
For example, `2014-11-18||/M` rounds down to `2014-11-01`, excluding
195-
the entire month.
194+
For example, `2014-11-18||/M` rounds down to `2014-10-31T23:59:59.999`, excluding
195+
the entire month of November.
196196
--
197197

198198
`lte`::
199199
+
200200
--
201-
Rounds up to the latest millisecond.
201+
Rounds up to the latest millisecond in the rounding interval.
202202

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

0 commit comments

Comments
 (0)