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
This commit is contained in:
Adrien Grand 2018-03-16 14:34:33 +01:00 committed by GitHub
parent a2d5cf6514
commit 695ec05160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,13 @@ JSON doesn't have a date datatype, so dates in Elasticsearch can either be:
Internally, dates are converted to UTC (if the time-zone is specified) and
stored as a long number representing milliseconds-since-the-epoch.
Queries on dates are internally converted to range queries on this long
representation, and the result of aggregations and stored fields is converted
back to a string depending on the date format that is associated with the field.
NOTE: Dates will always be rendered as strings, even if they were initially
supplied as a long in the JSON document.
Date formats can be customised, but if no `format` is specified then it uses
the default: