Skip to content

Commit

Permalink
Fix incorrect date nanos docs example (#52249)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rjernst committed Feb 12, 2020
1 parent f0668ca commit 12e378b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/mapping/types/date_nanos.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ GET my_index/_search
"my_field" : {
"script" : {
"lang" : "painless",
"source" : "doc['date'].date.nanos" <6>
"source" : "doc['date'].value.nano" <6>
}
}
}
Expand Down

0 comments on commit 12e378b

Please sign in to comment.