ES 6.2.1 Advice deleting old index after a reindex

Hi Team,

I would like to compress indexes when they become old.

The problem I have at the moment is I think the only way to compress an old index is to do a reindex to create a new index with best compression index codec and then, as a separate second step, delete the old original index.

This is a problem for me as when I use curator to try to do these two actions, even when I set the reindex action to wait for completion and not to continue if there's any exceptions, I have experienced times when curator proceeds to the delete action when the reindex has not completed therefore indexes are deleted prematurely hence data is lost.

Is there a way to do a reindex + deletion in a single atomic fashion?

Cheers,

Actually, you can do something like:

  • Closing the index
  • Change the index.codec setting
  • Open the index
  • Run a _forcemerge call

Would that work for you?

1 Like

Many thanks David,

I never knew I could do that - that sounds great.

One more question please, is it possible to rename an index without reindexing?

No but you can use alias.

Thanks David

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