As described https://www.elastic.co/guide/en/elasticsearch/guide/current/_cluster_health.html when a cluster is in RED state search queries will return partial results, and indexing into that shard will return an exception.
However applications that may be searching an elasticsearch index that is in Red state will still get a status 200 in the http response and therefore may assume all is ok with the results returned.
The only way to know that the query did not successfully search all shards is by checking the _shards object or even worse calling the index health API prior to the search request.
This is on Elasticsearch 1.7.5.
By default indexing requests are blocked when an index is in a red state, is there a way to do the same for search requests?
Alternatively provide a more appropriate response code for when partial results are returned from a RED index search, something akin to a HTTP "206 Partial Content".
Applications can then immediately decide whether to accept or reject the partial response without having to do inefficient pre search cluster/index state checks or post _shards object checks.