Reindex data from Elasticsearch 1.X to ElastichSearch with old _timeStamp to new Field

I am trying to migrate my data from an old Elasticsearch(Version 1.4.4) Cluster to a new one (5.1)

I am using the reindex api in the new Elasticsearch, but can't get the old _timestamp to a new field timestamp. Everything else works fine.

trying to do something like this.

POST _reindex
  "source": {
    "remote": {
      "host": "http://oldhost:9200"
    "index": "source"
    "query": {
       "match_all": {}
  "dest": {
    "index": "dest"
  "script": {
    "lang": "painless",
    "inline": "ctx._source.timestamp = ctx._timestamp

but the field timestamp in the new index is null.

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