jprante / elasticsearch-knapsack

Knapsack plugin is an import/export tool for Elasticsearch
Apache License 2.0
472 stars 77 forks source link

Type Mapping is lost when exporting with renaming an index #78

Open richtmat opened 9 years ago

richtmat commented 9 years ago

I am exporting an index with the rename parameter:

curl -XPOST 'localhost:9200/my_index1/my_type/_export?map={"my_index1:"my_index2"}&path=/tmp/archive.tar'

after import curl -XPOST 'localhost:9200/my_index1/my_type/_import?path=/tmp/archive.tar' all mappings of my_type are lost.

Is there any option to preserve mappings or is this a bug?

richtmat commented 9 years ago

Same thing for index settings.

jprante commented 9 years ago

Did you try renaming on import and not on export?

richtmat commented 9 years ago

Sorry for the confusion, I noticed that on creation of the issue and I did change my code, but not the issue.

So yes, I am renaming on import.