From 1dfb5f4d58a5b17b98d1eb60ad15e99d79df003c Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Tue, 28 Oct 2008 16:45:32 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 2 +- .../apache/solr/client/solrj/request/CoreAdminRequest.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3bd7c862dff..0f1ded61269 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/request/CoreAdminRequest.java b/client/java/solrj/src/org/apache/solr/client/solrj/request/CoreAdminRequest.java index 106a2832b68..c2a23895235 100644 --- a/client/java/solrj/src/org/apache/solr/client/solrj/request/CoreAdminRequest.java +++ b/client/java/solrj/src/org/apache/solr/client/solrj/request/CoreAdminRequest.java @@ -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);