2

We have requirement to redirect to a error page if the solr is stopped programtically in sitecore. Is there any way to check whether the solr is running or not?

7

I hope you are asking about how to do it under sitecore services and so on. So if yes, use it:

var solrConnector = ServiceLocator.Current.GetInstance<ISolrConnector>();
if (solrConnector.IsOnline)
{
   //your code
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.