How to reindex data and using inline (painless) script PUT /data/logs/1 { "title": "This is a document", "one": 1, "two": 2 } DELETE /new_data/_search GET /new_data/_search POST /_reindex { "source": { "index": "data" }, "dest": { "index": "new_data" }, "script": { "lang": "painless", "inline": "ctx._source.three = ctx._source.one + ctx._source.two" } } GET /new_data/logs/1 Elasticsearch Response { "_index": "new_data", "_type": "logs", "_id": "1", "_version": 2, "found": true, "_source": { "one": 1, "title": "This is a document", "two": 2, "three": 3 } }