Elasticsearch best_compression

Hi @VamPikmin

You will notice from the docs here that index.codec is a static setting meaning it can not be changed while the index is open and if it is changed it does not take effect until the index is merged

index.codec
The default value compresses stored data with LZ4 compression, but this can be set to best_compression which uses DEFLATE for a higher compression ratio, at the expense of slower stored fields performance. If you are updating the compression type, the new one will be applied after segments are merged. Segment merging can be forced using force merge.

So you will need to close the index then apply the index.code then open the index then forcemerge the segments. Forcemere may take time and space depending on the size of the indices.

POST my-index/_close
  
PUT my-index/_settings
{
    "codec": "best_compression"
}
  
POST my-index_open
  
POST my-index/_forcemerge?max_num_segments=1

Curious why you are not just using snapshots for this