Optimize action run on the Elasticsearch Cluster

I have a question concerning optimize action.

If I run optimize on the cluster, does optimize action is run independently on the primary shards and replica shards?

Or is it run only on primary and then replicated to the replacas?

The optimise will be run independently on the primaries and replicas

1 Like