I'm using Painless to create a filter, but when i use two dates this error happens:
"script": "doc['creation_date'].value > doc['update_date'].value",
"lang": "painless",
"caused_by": {
"type": "class_cast_exception",
"reason": "Cannot apply [>] operation to types [org.joda.time.MutableDateTime] and [org.joda.time.MutableDateTime]."
}
This the date type of this fields:
"field_name": {
"type": "date",
"index": true,
"format": "strict_date_time_no_millis"
},
I need convert this dates to epoch?