SOLR-1200

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@781656 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-06-04 06:23:42 +00:00
parent 40ef4b2599
commit 04ceffc543
1 changed files with 4 additions and 0 deletions

View File

@ -316,6 +316,10 @@ public class CoreAdminHandler extends RequestHandlerBase {
SolrParams params = req.getParams(); SolrParams params = req.getParams();
String cname = params.get(CoreAdminParams.CORE); String cname = params.get(CoreAdminParams.CORE);
SolrCore core = coreContainer.remove(cname); SolrCore core = coreContainer.remove(cname);
if(core == null){
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
"No such core exists '"+cname+"'");
}
core.close(); core.close();
return coreContainer.isPersistent(); return coreContainer.isPersistent();