Kibana - date format

Hello,
I am creating a scripted field in Kibana 7.0.0 and it came up this issue:
"{"type":"illegal_argument_exception","reason":"Illegal list shortcut value [date]."}}}]},"status":400}"
My scripted field is doing "doc['data'].date.year".

What can I do?
Thanks.

@Francisca_Lima

there were some changes to the date handling in painless in 7.0. See https://www.elastic.co/guide/en/elasticsearch//reference/current/breaking-changes-7.0.html#_getdate_and_getdates_removed for details.

Instead of using the getDate() function with the .date notation, you would need to access it with .value, as is shown here https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-examples.html#modules-scripting-painless-dates

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.