How to increase shard count for existing indices

Hi,

I want to increase the shard count of my indices. Is that possible to do that?

I researched and found there is a possibilities to achieve the same using template, but as per my understanding we can do that only for newly create indices if we use template.

So I want something which can be used to change the shard count of existing indices without creating new indices.

You can use the Split index API which allows you to increase the number of primary shards in an existing index. But it requires you to set the index to read-only before the split operation and you can only increase the number of shards with certain factors.

I personally prefer to use the Reindex API as I can then specify the exact number of shards I want in the new index. Plus I don't have to set the old index to read-only while I perform the reindexing. Afterward I simply switch the alias and synch up the changes with a final reindex call before deleting the old index.

Good luck!

Yeah I also think it's better to use Reindex API, thinking of using that only. Anyways thanks for the suggestion. :+1: :slightly_smiling_face:

1 Like

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