Return 503 for search against a node which is not yet ready, closes #1713.

This commit is contained in:
Shay Banon 2012-02-17 15:20:20 +02:00
parent 7bd87e12a2
commit bf36681e34
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ public abstract class TransportSearchTypeAction extends TransportAction<SearchRe
this.clusterState = clusterService.state();
nodes = clusterState.nodes();
clusterState.blocks().globalBlockedRaiseException(ClusterBlockLevel.READ);
String[] concreteIndices = clusterState.metaData().concreteIndices(request.indices(), false, true);
for (String index : concreteIndices) {