Example usage for org.apache.solr.common.cloud SolrZkClient clean

List of usage examples for org.apache.solr.common.cloud SolrZkClient clean

Introduction

In this page you can find the example usage for org.apache.solr.common.cloud SolrZkClient clean.

Prototype

public void clean(String path) throws InterruptedException, KeeperException 

Source Link

Usage

From source file:com.doculibre.constellio.services.SolrServicesImpl.java

License:Open Source License

public static synchronized void deleteCollectionInCloud(String collectionName) {
    try {/*w  w w  .ja va 2  s.  c  o  m*/
        ModifiableSolrParams params = new ModifiableSolrParams();
        params.set(CommonParams.QT, "/admin/collections");
        params.set(CommonParams.ACTION, "DELETE");
        params.set("name", collectionName);
        SolrCoreContext.getMainSolrServer().query(params);

        SolrZkClient zkClient = SolrCoreContext.getSolrZkClient();
        zkClient.clean(ZkController.CONFIGS_ZKNODE + "/" + collectionName);
    } catch (Exception e) {
        e.printStackTrace();
    }
}