Shrink Index - add 'shrink' as a suffix


We recently enabled an ILM policy for our indices using the Kibana UI. We have enabled the shrink and force merge options as follows:

The issue is, after rollover, the index (my-index-00001) is named as shrink-my-index-00001. Is it possible to specify the name of the new shrunk index in ILM? Otherwise. I will have to change my index patterns, visualizations and dashboards cause the new pattern would be *my-index-*, instead of the current pattern my-index-*.

Also, what is the optimum number of segments that I should specify during the force merge operation?


No, it's not possible currently to change the name of the shrunken index.

As for querying it though, when ILM shrinks an index it does create an alias for the index with the same name as the previous one, so my-index-000001 becomes shrink-my-index-000001 and an alias is created called my-index-000001 pointing to the new shrink-prefixed index.

1 Like

This will depend on how large the shard is, and how many indices you have in your cluster. A fully force merged index is one with a single segment, but you may want to keep more segments around if the shard is really huge (100s of gigabytes).

That's great. So, does that mean that my existing index pattern of my-index-* will work for the shrunk index too, right?

This would save me the trouble of reworking my dashboards and visualizations. :smiley:

So, we currently have around 100-150 indices in the cluster, and we are aiming to keep the shard size to around 40GB. So we have around 3 shards of 40GB each for our shrunk indices.

Does that mean a fully force merged index will give me better read/search operations?

Yes that's correct.

Okay, for a 40gb shard you should be completely fine to fully force merge it to a single segment.

1 Like

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