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

**URL:** https://discuss.elastic.co/t/elasticsearch-transorming-data-from-1-x-to-5-x-reindex-remote-unable-to-migrate--timestamp/88119
**Category:** Elasticsearch
**Created:** [June 2, 2017, 5:07pm UTC](https://discuss.elastic.co/t/elasticsearch-transorming-data-from-1-x-to-5-x-reindex-remote-unable-to-migrate--timestamp/88119 "2017-06-02T17:07:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![elastic\_boston](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@elastic\_boston](https://discuss.elastic.co/u/elastic_boston)
#### Post date: [June 2, 2017, 5:07pm UTC](https://discuss.elastic.co/t/elasticsearch-transorming-data-from-1-x-to-5-x-reindex-remote-unable-to-migrate--timestamp/88119/1 "2017-06-02T17:07:09Z")

</div>

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](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](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?

---

<div class="post-metadata">

### Author: ![elastic\_boston](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@elastic\_boston](https://discuss.elastic.co/u/elastic_boston)
#### Post date: [June 5, 2017, 3:13pm UTC](https://discuss.elastic.co/t/elasticsearch-transorming-data-from-1-x-to-5-x-reindex-remote-unable-to-migrate--timestamp/88119/2 "2017-06-05T15:13:30Z")

</div>

No one has any input on this??

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 3, 2017, 3:13pm UTC](https://discuss.elastic.co/t/elasticsearch-transorming-data-from-1-x-to-5-x-reindex-remote-unable-to-migrate--timestamp/88119/3 "2017-07-03T15:13:58Z")

</div>

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