You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2017/06/29 03:05:13 UTC

lucene-solr:jira/solr-10272: SOLR-10272: Fix standalone create_core

Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-10272 [created] b72750bb7


SOLR-10272: Fix standalone create_core


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b72750bb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b72750bb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b72750bb

Branch: refs/heads/jira/solr-10272
Commit: b72750bb740a20362616fa0d85c5eca9bd9680fc
Parents: c98e2a5
Author: Ishan Chattopadhyaya <is...@lucidworks.com>
Authored: Thu Jun 29 08:34:53 2017 +0530
Committer: Ishan Chattopadhyaya <is...@lucidworks.com>
Committed: Thu Jun 29 08:34:53 2017 +0530

----------------------------------------------------------------------
 solr/bin/solr     | 12 +++++++-----
 solr/bin/solr.cmd |  1 +
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b72750bb/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index cd27fda..c9aad2f 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -943,12 +943,14 @@ if [[ "$SCRIPT_CMD" == "create" || "$SCRIPT_CMD" == "create_core" || "$SCRIPT_CM
     done
   fi
 
+  if [ -z "$CREATE_CONFDIR" ]; then
+    CREATE_CONFDIR='_default'
+  fi
+  
   # validate the confdir arg (if provided)
-  if ! [ -z "$CREATE_CONFDIR" ]; then
-    if [[ ! -d "$SOLR_TIP/server/solr/configsets/$CREATE_CONFDIR" && ! -d "$CREATE_CONFDIR" ]]; then
-      echo -e "\nSpecified configuration directory $CREATE_CONFDIR not found!\n"
-      exit 1
-    fi
+  if [[ ! -d "$SOLR_TIP/server/solr/configsets/$CREATE_CONFDIR" && ! -d "$CREATE_CONFDIR" ]]; then
+    echo -e "\nSpecified configuration directory $CREATE_CONFDIR not found!\n"
+    exit 1
   fi
 
   if [ -z "$CREATE_NAME" ]; then

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b72750bb/solr/bin/solr.cmd
----------------------------------------------------------------------
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 99bd815..eae6eb2 100644
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1404,6 +1404,7 @@ IF "!CREATE_NAME!"=="" (
   set "SCRIPT_ERROR=Name (-c) is a required parameter for %SCRIPT_CMD%"
   goto invalid_cmd_line
 )
+IF "!CREATE_CONFDIR!"=="" set CREATE_CONFDIR=_default
 IF "!CREATE_NUM_SHARDS!"=="" set CREATE_NUM_SHARDS=1
 IF "!CREATE_REPFACT!"=="" set CREATE_REPFACT=1