Efficient way to replace all content of a cluster


#1

Hello Elastic experts,

If I want to replace all content of a cluster, wondering what is the most efficient way? Is there any mode of clean-up everything and batch insert new records afterwards?

thanks in advance,
Lin


(David Pilato) #2

DELETE index

Then reindex

If you have enough disk you can index in a new index then switch the alias (if you have one) and delete the old one.


#3

Hi David,

I am interested in this solution, "If you have enough disk you can index in a new index then switch the alias (if you have one) and delete the old one.", any referred documents? Thanks.

regards,
Lin


(David Pilato) #4

https://www.elastic.co/guide/en/elasticsearch/guide/current/index-aliases.html


#5

This is the exact solution I am looking for, thanks David.


(system) #6