Description
Today when we detect that no replicas are available for a shard we mark the shard as failed but don't count it as failed
in the search response header. We also don't return the exception in the response so the only way to detect that a set of replicas is not available for a shard is to check whether total
is equal to successful
in the response. While this could be documented properly I wonder if we should not treat this exception as a regular failure in order to simplify the handling/detection of search failures. This behavior is quite old so this would be a breaking change but I doubt that a lot of users are aware of this. We also have a way to be not lenient when shard failures are detected (accept_partial_results
) so it feels more natural to me to consider this kind of failure as any other exceptions.