returnnewHealthCheck(GetType(),HealthCheckResult.Error,"All indexers are unavailable due to failures","#indexers-are-unavailable-due-to-failures");
}
if(backOffIndexers.Count>1)
{
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("{0} indexers are unavailable due to failures",backOffIndexers.Count),"#indexers-are-unavailable-due-to-failures");
}
varindexer=backOffIndexers.First();
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Indexer {0} is unavailable due to failures",indexer.Indexer.Definition.Name),"#indexers-are-unavailable-due-to-failures");
returnnewHealthCheck(GetType(),HealthCheckResult.Warning,string.Format("Indexers unavailable due to failures: {0}",string.Join(", ",backOffIndexers.Select(v=>v.Indexer.Definition.Name))),"#indexers-are-unavailable-due-to-failures");