Export Index and structure


I have currently a very old installation of Elasticsearch on a node with 3 indexes and maybe about 1000 documents.

I have now installed a the newest version and would import all of the current environment to the new node but without any data.

That means:

Indexes, Analyzer, Mappings, Setting, just everything defined on the current node....

What is the best way to do that to be sure that nothing is lost?

I would then run one script per index and import the structure without any data.


You do not specify how old your "very old" installation of Elasticsearch is, but I expect there will have been changes between that version and the newest ones that mean you can't simply port everything across without making some adaptations.

You will be able to use APIs to get the mapping and settings for each index.

Hi David

thanks for reply. The version installed is 0.90.13.

As think that I cannot change the mappings after creation of the index neither the settings, do I have to merge the two exported scripts for mapping and settings then to newly crete the index?


Yes that's what I'd try. I would expect you'll need to iterate, deleting and re-creating the indices, until you get everything as you want.

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