Hey there,
I am new to Elastic search. I am trying to update a record by using _update_by_query API, by using a painless script as below.
"script": {
"source": "if(ctx._source.global_cro_dist_due < params.current){ctx._source.oud_modified_by = 'SYSTEM2'}",
"lang": "painless",
"params" : {
"current" : "2020-03-24T13:32:00"
}
}
But, the above script is giving me below error.
"caused_by": {
"type": "illegal_argument_exception",
"reason": "field [java.lang.System, currentTimeInMillis] not found"
}
Any thought or solution is most welcome and appreciated.
Note: Basically, i am stuck in comparing dates in if clause. Please help me to resolve this.