Hi All,
I am getting an exception as below. Please help me out.
Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"script_exception","reason":"runtime error","script_stack":["return (doc['issues.fields.resolutiondate'].value - doc['issues.fields.created'].value)/1000/60/60/24;"," ^---- HERE"],"script":"if(doc['issues.fields.resolutiondate'].value != 0 && doc['issues.fields.created'].value != 0) return (doc['issues.fields.resolutiondate'].value - doc['issues.fields.created'].value)/1000/60/60/24;","lang":"painless"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"fetch","grouped":true,"failed_shards":[{"shard":0,"index":"jira-db","node":"PyQpy3RDSAu7hMnnEXxGlg","reason":{"type":"script_exception","reason":"runtime error","script_stack":["return (doc['issues.fields.resolutiondate'].value - doc['issues.fields.created'].value)/1000/60/60/24;"," ^---- HERE"],"script":"if(doc['issues.fields.resolutiondate'].value != 0 && doc['issues.fields.created'].value != 0) return (doc['issues.fields.resolutiondate'].value - doc['issues.fields.created'].value)/1000/60/60/24;","lang":"painless","caused_by":{"type":"class_cast_exception","reason":**"Cannot apply [-] operation to types [org.joda.time.DateTime] and [org.joda.time.DateTime]."}}}]},"status":500}**
I think the reason for the above error.
"Cannot apply [-] operation to types [org.joda.time.DateTime] and [org.joda.time.DateTime]."}}}]},"status":500}`