Prefer local shards for validate action

This commit is contained in:
Lee Hinman 2011-12-28 08:54:55 -07:00
parent be6e18cb36
commit 0cb1a2ebe1
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ public class TransportValidateAction extends TransportBroadcastOperationAction<V
protected GroupShardsIterator shards(ValidateRequest request, String[] concreteIndices, ClusterState clusterState) {
// Hard-code routing to limit request to a single shard.
Map<String, Set<String>> routingMap = clusterState.metaData().resolveSearchRouting("0", request.indices());
return clusterService.operationRouting().searchShards(clusterState, request.indices(), concreteIndices, null, routingMap, null);
return clusterService.operationRouting().searchShards(clusterState, request.indices(), concreteIndices, null, routingMap, "_local");
}
@Override