small optimization to counting search shards

This commit is contained in:
kimchy 2011-07-08 06:04:33 +03:00
parent 0642acd9ac
commit 5a8b27b9dc
1 changed files with 1 additions and 3 deletions

View File

@ -127,9 +127,7 @@ public class PlainOperationRouting extends AbstractComponent implements Operatio
int count = 0;
for (String index : concreteIndices) {
IndexRoutingTable indexRouting = indexRoutingTable(clusterState, index);
for (IndexShardRoutingTable indexShard : indexRouting) {
count++;
}
count += indexRouting.shards().size();
}
return count;
}