We have an elasticsearch cluster consisting of 6 nodes version 6 and we have an index called bishkek in the cluster, now I want to copy only the index mappings (no data) to the new index bishkek_v2

2 Answers

Elasticsearch doesn't have any API that copy only mappings, so you would need to first get your mapping for bishkek index and create new index based on the mapping. To get the mapping you can run this GET Request.

GET /bishkek/_mapping 

After getting the mapping you create your new Index:

PUT /bishkek_v2 { "mappings": { [Mapping you get from your old index] } } 

I think this will help you to clone the index

POST /my_source_index/_clone/my_target_index 
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.