How does the best_compression work after I setting it?

I am working on index compression currently. Now I have existed index about 500MB to be compressed, but I meet the following questions:

  1. When does the best_compression work after I setting it? Immediately or after a while?
  2. Does it work on existed index or the upcoming index data? Or both?
  3. Have the index data been compressed by LZ4 if I don't set the index.codec ?

Thanks.

By default we use LZ4.

To change this setting you need to close, update, reopen and then issue a force merge on the index in question for it to be applied. Otherwise if you move an index to a node that has that set in it's config, then issue a force merge, it'll be applied.

We should really make this clearer in the docs!

https://github.com/elastic/elasticsearch/issues/23646 :slight_smile:

Thanks! Actually the issue in Github is submitted by me. LOL

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