Skip to content

Commit 073c7ab

Browse files
committed
Clarify that dates are always rendered as strings. (#29093)
Even in the case that the date was originally supplied as a long in the JSON document. Closes #26504
1 parent 115c1fb commit 073c7ab

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/reference/mapping/types/date.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ JSON doesn't have a date datatype, so dates in Elasticsearch can either be:
1010
Internally, dates are converted to UTC (if the time-zone is specified) and
1111
stored as a long number representing milliseconds-since-the-epoch.
1212

13+
Queries on dates are internally converted to range queries on this long
14+
representation, and the result of aggregations and stored fields is converted
15+
back to a string depending on the date format that is associated with the field.
16+
17+
NOTE: Dates will always be rendered as strings, even if they were initially
18+
supplied as a long in the JSON document.
19+
1320
Date formats can be customised, but if no `format` is specified then it uses
1421
the default:
1522

0 commit comments

Comments
 (0)