You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2014/12/24 16:46:38 UTC

svn commit: r1647808 - in /lucene/dev/trunk/solr/bin: solr solr.cmd

Author: thelabdude
Date: Wed Dec 24 15:46:37 2014
New Revision: 1647808

URL: http://svn.apache.org/r1647808
Log:
SOLR-6866: schemaless example should create core/collection named gettingstarted

Modified:
    lucene/dev/trunk/solr/bin/solr
    lucene/dev/trunk/solr/bin/solr.cmd

Modified: lucene/dev/trunk/solr/bin/solr
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/bin/solr?rev=1647808&r1=1647807&r2=1647808&view=diff
==============================================================================
--- lucene/dev/trunk/solr/bin/solr (original)
+++ lucene/dev/trunk/solr/bin/solr Wed Dec 24 15:46:37 2014
@@ -1196,14 +1196,21 @@ if [ "$EXAMPLE" != "cloud" ]; then
 
   # create the core/collection for the requested example after launching Solr
   if [[ "$EXAMPLE" == "schemaless" || "$EXAMPLE" == "techproducts" ]]; then
+
+    if [ "$EXAMPLE" == "schemaless" ]; then
+      EXAMPLE_NAME=gettingstarted
+    else
+      EXAMPLE_NAME=$EXAMPLE
+    fi
+
     if [ "$SOLR_MODE" == "solrcloud" ]; then
-      run_tool create_collection -name $EXAMPLE -shards 1 -replicationFactor 1 \
+      run_tool create_collection -name $EXAMPLE_NAME -shards 1 -replicationFactor 1 \
         -config $EXAMPLE_CONFIGSET -configsetsDir $SOLR_TIP/server/solr/configsets -solrUrl http://localhost:$SOLR_PORT/solr
       if [ $? -ne 0 ]; then
         exit 1
       fi
     else
-      run_tool create_core -name $EXAMPLE -solrUrl http://localhost:$SOLR_PORT/solr \
+      run_tool create_core -name $EXAMPLE_NAME -solrUrl http://localhost:$SOLR_PORT/solr \
         -config $EXAMPLE_CONFIGSET -configsetsDir $SOLR_TIP/server/solr/configsets
       if [ $? -ne 0 ]; then
         exit 1

Modified: lucene/dev/trunk/solr/bin/solr.cmd
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/bin/solr.cmd?rev=1647808&r1=1647807&r2=1647808&view=diff
==============================================================================
--- lucene/dev/trunk/solr/bin/solr.cmd (original)
+++ lucene/dev/trunk/solr/bin/solr.cmd Wed Dec 24 15:46:37 2014
@@ -715,8 +715,10 @@ IF "%FG%"=="1" (
 )
 
 
+set EXAMPLE_NAME=%EXAMPLE%
 set CREATE_EXAMPLE_CONFIG=
 IF "%EXAMPLE%"=="schemaless" (
+  set EXAMPLE_NAME=gettingstarted
   set CREATE_EXAMPLE_CONFIG=data_driven_schema_configs
 )
 IF "%EXAMPLE%"=="techproducts" (
@@ -728,12 +730,12 @@ IF NOT "!CREATE_EXAMPLE_CONFIG!"=="" (
   IF "%SOLR_MODE%"=="solrcloud" (
     "%JAVA%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^
       -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
-      org.apache.solr.util.SolrCLI create_collection -name !EXAMPLE! -shards 1 -replicationFactor 1 ^
+      org.apache.solr.util.SolrCLI create_collection -name !EXAMPLE_NAME! -shards 1 -replicationFactor 1 ^
       -config !CREATE_EXAMPLE_CONFIG! -configsetsDir "%SOLR_SERVER_DIR%\solr\configsets" -solrUrl http://localhost:%SOLR_PORT%/solr
   ) ELSE (
     "%JAVA%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^
       -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
-      org.apache.solr.util.SolrCLI create_core -name !EXAMPLE! -solrUrl http://localhost:%SOLR_PORT%/solr ^
+      org.apache.solr.util.SolrCLI create_core -name !EXAMPLE_NAME! -solrUrl http://localhost:%SOLR_PORT%/solr ^
       -config !CREATE_EXAMPLE_CONFIG! -configsetsDir "%SOLR_SERVER_DIR%\solr\configsets"
   )
 )