Elasticsearch Transorming data from 1.x to 5.x - reindex remote - unable to migrate _timestamp

There has been another post about this, but there was no response.

I have an old index in ES 1.x, that I want to migrate to 5.x. The source documents have the _timestamp field enabled. I am using the remote-reindex api and need to migrate the _timestamp field. Have not been able to do this. I have tried using ingest pipelines as in the following

PUT _ingest/pipeline/p1
{
"processors": [
{
"set" : {
"field" : "new_timestamp",
"value" : "{{_source_ingest.timestamp}}"
}
}
]
}
Then I run the reindex as

POST _reindex
{
"size": 1,
"source": {
"remote": {
"host": "http://xxx:9200"

},
"index": "twitter2"

},
"dest": {
"index": "twitter2",
"pipeline": "p1"
}
}
I have also tried to use inline scripts as

POST _reindex
{
"source": {
"remote": {
"host": "http://xxx:9200"

},
"index": "twitter2"

},
"dest": {
"index": "twitter2"
},
"script": {
"lang": "painless",
"inline": "ctx._source.new_timestamp=ctx._source.timestamp"
}
}
But both these presented null fields in the results. Has anyone been able to solve this please?

No one has any input on this??

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