Can re-index be used to "copy" an index?


Can I use re-index to clone one whole index A into index B?

Using elasticsearch python API.


in plain word yes

Can you please give me some documentation or other resource to back this up?

Assuming you've made no changes to your index templates, the basic reindex example on the Reindex API page would result in a copy of the existing index.

Just make sure your new index uses the same index template as the previous index.

So, if your index template matches on twitter_*

POST _reindex
"source": {
"index": "twitter_old"
"dest": {
"index": "twitter_new"

Should result in a copy of twitter_old in twitter_new.

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