MCPcopy Create free account
hub / github.com/apache/solr / deleteCore

Method deleteCore

solr/core/src/java/org/apache/solr/cli/DeleteTool.java:202–217  ·  view source on GitHub ↗
(CommandLine cli, SolrClient solrClient)

Source from the content-addressed store, hash-verified

200 }
201
202 protected void deleteCore(CommandLine cli, SolrClient solrClient) throws Exception {
203 String coreName = cli.getOptionValue(COLLECTION_NAME_OPTION);
204
205 echo("\nDeleting core '" + coreName + "' using V2 Cores API\n");
206
207 try {
208 var req = new CoresApi.UnloadCore(coreName);
209 req.setDeleteIndex(true);
210 req.setDeleteDataDir(true);
211 req.setDeleteInstanceDir(true);
212 var response = req.process(solrClient);
213 echoIfVerbose(response);
214 } catch (SolrServerException sse) {
215 throw new Exception("Failed to delete core '" + coreName + "' due to: " + sse.getMessage());
216 }
217 }
218}

Callers 15

runImplMethod · 0.95
cleanupMethod · 0.45
assertConfigsMethod · 0.45
testDeleteCoreMethod · 0.45
afterDestroyCoreMethod · 0.45
tearDownMethod · 0.45
afterTestMethod · 0.45
afterTestMethod · 0.45
testIndexRetrieveMethod · 0.45
tearDownMethod · 0.45
tearDownCoreMethod · 0.45

Calls 7

echoMethod · 0.80
setDeleteIndexMethod · 0.80
echoIfVerboseMethod · 0.80
processMethod · 0.65
setDeleteDataDirMethod · 0.45
setDeleteInstanceDirMethod · 0.45
getMessageMethod · 0.45

Tested by 15

cleanupMethod · 0.36
assertConfigsMethod · 0.36
testDeleteCoreMethod · 0.36
afterDestroyCoreMethod · 0.36
tearDownMethod · 0.36
afterTestMethod · 0.36
afterTestMethod · 0.36
testIndexRetrieveMethod · 0.36
tearDownMethod · 0.36
tearDownCoreMethod · 0.36