How to find whether solr server is running or not
问题 I am running an application that get search results from solr server. But when server is not running i get no response from the server. Is there any way i can found that my server is not running so that i can give proper error message regarding it 回答1: You could periodically ping your server (e.g. http://localhost:8983/solr/admin/ping ) and in case of an error pass that message on to the frontend... 回答2: If you have SolrServer object, just call SolrServer.ping() it throws exception if can't