Browse Source

Fix incorrect date nanos docs example (#52249)

The example of how to access the nano value of a date_nanos field has
been broken since it was created. This commit fixes it to use the
correct scripting methods.

closes #51931
Ryan Ernst 5 years ago
parent
commit
f7c989731e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/reference/mapping/types/date_nanos.asciidoc

+ 1 - 1
docs/reference/mapping/types/date_nanos.asciidoc

@@ -61,7 +61,7 @@ GET my_index/_search
     "my_field" : {
       "script" : {
         "lang" : "painless",
-        "source" : "doc['date'].date.nanos" <6>
+        "source" : "doc['date'].value.nano" <6>
       }
     }
   }