Breaking _ingest.timestamp change in ES 5.3.0

Same as:

which was closed without any examples or explanation.

I have a simple code:
processors": [
{
"set": {
"field": "mo_timestamp_server",
"value": "{{_ingest.timestamp}}"
}
}

where mo_timestamp_server is mapped:
"mo_timestamp_server": {
"type": "date"
}

and after migration from 5.0.2 to 5.3.0 it doesn't work anymore throwing exception:

"illegal_argument_exception","reason":"Invalid format: "Wed Apr 19 05:59:44 UTC 2017"

How can I define _ingest.timestamp format to follow this:
"timestamp": "2016-06-21T18:48:55.560+0000"

Best

Mikolaj Habdank

working solution is:
"script": {
"lang": "groovy",
"inline": "ctx.mo_timestamp_server = Instant.now()",
"ignore_failure": false
}

painless doesn't support Instant.now()
processor set doesn't support correct formating and any ISO.. doesn't work
"set": {
"field": "mo_timestamp_server",
"value": "{{DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(_ingest.timestamp)}}"
}

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