List of usage examples for org.apache.solr.client.solrj.request CoreAdminRequest getCoreStatus
public static CoreStatus getCoreStatus(String coreName, SolrClient client) throws SolrServerException, IOException
From source file:org.opencb.commons.datastore.solr.SolrManager.java
License:Apache License
/** * Check if a given core exists./* ww w . ja v a 2 s . c o m*/ * * @param coreName Core name * @return True or false */ public boolean existsCore(String coreName) { try { CoreStatus status = CoreAdminRequest.getCoreStatus(coreName, solrClient); status.getInstanceDirectory(); } catch (Exception e) { return false; } return true; }