lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r909138 - /lucene/solr/branches/cloud/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Date Thu, 11 Feb 2010 20:35:11 GMT
Author: yonik
Date: Thu Feb 11 20:35:10 2010
New Revision: 909138

URL: http://svn.apache.org/viewvc?rev=909138&view=rev
Log:
default instanceDir to core name for on-the-fly core creation

Modified:
    lucene/solr/branches/cloud/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=909138&r1=909137&r2=909138&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
(original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Thu Feb 11 20:35:10 2010
@@ -229,7 +229,14 @@
     try {
       SolrParams params = req.getParams();
       String name = params.get(CoreAdminParams.NAME);
-      CoreDescriptor dcore = new CoreDescriptor(coreContainer, name, params.get(CoreAdminParams.INSTANCE_DIR));
+
+      String instanceDir = params.get(CoreAdminParams.INSTANCE_DIR);
+      if (instanceDir == null) {
+        // instanceDir = coreContainer.getSolrHome() + "/" + name;
+        instanceDir = name; // bare name is already relative to solr home
+      }
+
+      CoreDescriptor dcore = new CoreDescriptor(coreContainer, name, instanceDir);
 
       //  fillup optional parameters
       String opts = params.get(CoreAdminParams.CONFIG);



Mime
View raw message