From 5149554709e3a11c69cd09a242d709dc1d9a3d84 Mon Sep 17 00:00:00 2001 From: Przemyslaw Gomulka Date: Fri, 26 Jun 2020 09:02:08 +0200 Subject: [PATCH] Update format.asciidoc to describe strict_date_optional_time_nanos (#57527) (#58581) closes #57019 --- docs/reference/mapping/params/format.asciidoc | 11 +++++++++-- docs/reference/mapping/types/date_nanos.asciidoc | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/reference/mapping/params/format.asciidoc b/docs/reference/mapping/params/format.asciidoc index 15a79227930..9e7ff393f55 100644 --- a/docs/reference/mapping/params/format.asciidoc +++ b/docs/reference/mapping/params/format.asciidoc @@ -66,10 +66,17 @@ The following tables lists all the defaults ISO formats supported: [[strict-date-time]]`date_optional_time` or `strict_date_optional_time`:: - A generic ISO datetime parser where the date, in `year_month_day` format, is - mandatory and the time, separated by `T`, is optional. + A generic ISO datetime parser, where the date must include the year at a minimum, and the time + (separated by `T`), is optional. Examples: `yyyy-MM-dd'T'HH:mm:ss.SSSZ` or `yyyy-MM-dd`. +[[strict-date-time-nanos]]`strict_date_optional_time_nanos`:: + + A generic ISO datetime parser, where the date must include the year at a minimum, and the time + (separated by `T`), is optional. The fraction of a second + part has a nanosecond resolution. + Examples: `yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ` or `yyyy-MM-dd`. + `basic_date`:: A basic formatter for a full date as four digit year, two digit month of diff --git a/docs/reference/mapping/types/date_nanos.asciidoc b/docs/reference/mapping/types/date_nanos.asciidoc index 42ec50d028d..6816c6f0037 100644 --- a/docs/reference/mapping/types/date_nanos.asciidoc +++ b/docs/reference/mapping/types/date_nanos.asciidoc @@ -24,7 +24,9 @@ This means that it will accept dates with optional timestamps, which conform to the formats supported by <> including up to nine second fractionals or milliseconds-since-the-epoch (thus losing precision on the -nano second part). +nano second part). Using <> will +format the result up to only three second fractionals. To +print and parse up to nine digits of resolution, use <>. For instance: @@ -98,4 +100,3 @@ same mapping parameters than with the `date` field can be used. Aggregations are still on millisecond resolution, even when using a `date_nanos` field. This limitation also affects <>. -