diff --git a/src/main/java/org/elasticsearch/cluster/routing/operation/plain/PlainOperationRouting.java b/src/main/java/org/elasticsearch/cluster/routing/operation/plain/PlainOperationRouting.java index afc4dd38c13..db113d6c2b3 100644 --- a/src/main/java/org/elasticsearch/cluster/routing/operation/plain/PlainOperationRouting.java +++ b/src/main/java/org/elasticsearch/cluster/routing/operation/plain/PlainOperationRouting.java @@ -130,6 +130,10 @@ public class PlainOperationRouting extends AbstractComponent implements Operatio // we might get duplicates, but that's ok, its an estimated count? (we just want to know if its 1 or not) set.add(indexShard.shardId()); } + } else { + for (IndexShardRoutingTable indexShard : indexRouting) { + set.add(indexShard.shardId()); + } } } return set.size();