Painless script, get error dynamic method [java.lang.Long, getMillis/0] not found

So when i run this script,

doc['date_updated'].value.getMillis() > params.one_day ? 1.9

i get the error dynamic method [java.lang.Long, getMillis/0] not found
Im not sure what this error means or if im missing something from installing java or elasticsearch.

im using elasticsearch 6.8.12.

I added the variable JAVA_HOME and assigned it the path to the java executable in the elasticsearch-env but that didnt seem to do much.

If anyone can just help me understand this error.

Any help you be greatly appreciated

try doc['@timestamp'].value.millis - also, please check your mapping if date_updated really is mapped as a timestamp field, as it looks me that it is mapped as a regular long.

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