Wow -- thanks for all the help!! With everyone's help, I did end up in a *much* better place:

private static boolean solrCoreExists(String coreName, String solrRootUrl) throws IOException, SolrServerException
    {
CommonsHttpSolrServer adminServer = new CommonsHttpSolrServer(solrRootUrl); CoreAdminResponse status = CoreAdminRequest.getStatus(coreName, adminServer);

return status.getCoreStatus(coreName).get("instanceDir") != null;
    }


On Dec 5, 2008, at 1:09 AM, Ryan McKinley wrote:

yes:
http://localhost:8983/solr/admin/cores?action=STATUS

will give you a list of running cores. However that is not easy to check with a simple status != 404

see:
http://wiki.apache.org/solr/CoreAdmin


On Dec 4, 2008, at 11:46 PM, Chris Hostetter wrote:


: Subject: Is there a clean way to determine whether a core exists?

doesn't the CoreAdminHandler's STATUS feature make this easy?




-Hoss



Reply via email to