use of io.searchbox.indices.DeleteIndex in project herd by FINRAOS.
the class IndexFunctionsDaoImpl method deleteIndex.
/**
* The delete index function will take as an argument the index name and will delete the index.
*/
@Override
public final void deleteIndex(String indexName) {
Action action = new DeleteIndex.Builder(indexName).build();
LOGGER.info("Deleting Elasticsearch index, indexName={}.", indexName);
JestResult result = jestClientHelper.executeAction(action);
LOGGER.info("Deleting Elasticsearch index, indexName={}. result successful is {} ", indexName, result.isSucceeded());
}
use of io.searchbox.indices.DeleteIndex in project dq-easy-cloud by dq-open-cloud.
the class TransportClient method deleteIndexAll.
/**
* 将删除所有的索引
*
* @throws Exception
*/
@Test
public void deleteIndexAll() throws Exception {
DeleteIndex deleteIndex = new DeleteIndex.Builder("article").build();
JestResult result = jestClient.execute(deleteIndex);
System.out.println(result.getJsonString());
}
Aggregations