SOLR-827 -- fix solrj admin create core

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@708606 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2008-10-28 16:45:32 +00:00
parent eb5ae4dcc0
commit 1dfb5f4d58
2 changed files with 6 additions and 2 deletions

View File

@ -89,7 +89,7 @@ Bug Fixes
4. SOLR-805: DisMax queries are not being cached in QueryResultCache (Todd Feak via koji)
5. SOLR-803: CoreAdminRequest.createCore fails because name parameter isn't set (Sean Colombo via ryan)
5. SOLR-803, SOLR-827: Fix CoreAdminRequest#createCore (Sean Colombo via ryan)
Other Changes

View File

@ -66,7 +66,11 @@ public class CoreAdminRequest extends SolrRequest
}
ModifiableSolrParams params = new ModifiableSolrParams();
params.set( CoreAdminParams.ACTION, action.toString() );
params.set( CoreAdminParams.NAME, core );
if( action.equals(CoreAdminAction.CREATE) ) {
params.set( CoreAdminParams.NAME, core );
} else {
params.set( CoreAdminParams.CORE, core );
}
params.set( CoreAdminParams.INSTANCE_DIR, instanceDir);
if (configName != null) {
params.set( CoreAdminParams.CONFIG, configName);