Adjusting number of replica shards?

Can I just the number of replica shards after index creation and the index starts taking documents? Can I increase and decrease as well?

For our staging, I currently have 1 and I want to reduce it to 0. Will that automatically remove the replica shard if I change the number of replicas?

Hi,

Yes

And yes!

Thanks. I wanted to test it out on staging first before I try it on production. Thanks for the super ultra fast response!

Sure. Adding replicas can have a cost: files need to be created, shards need to be allocated to a node, then files need to be sent over the wire etc. This is not a lightweight process but you can change the replica number even after the index created.

If I go from 1 to 0 will Elasticsearch free up the resources from the replica shard?

Yes, of course.