SOLR-6866: schemaless example should create core/collection named gettingstarted

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1647808 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy Potter 2014-12-24 15:46:37 +00:00
parent aec7811b66
commit 27f8a4649d
2 changed files with 13 additions and 4 deletions

View File

@ -1196,14 +1196,21 @@ if [ "$EXAMPLE" != "cloud" ]; then
# create the core/collection for the requested example after launching Solr # create the core/collection for the requested example after launching Solr
if [[ "$EXAMPLE" == "schemaless" || "$EXAMPLE" == "techproducts" ]]; then if [[ "$EXAMPLE" == "schemaless" || "$EXAMPLE" == "techproducts" ]]; then
if [ "$EXAMPLE" == "schemaless" ]; then
EXAMPLE_NAME=gettingstarted
else
EXAMPLE_NAME=$EXAMPLE
fi
if [ "$SOLR_MODE" == "solrcloud" ]; then 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 -config $EXAMPLE_CONFIGSET -configsetsDir $SOLR_TIP/server/solr/configsets -solrUrl http://localhost:$SOLR_PORT/solr
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
else 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 -config $EXAMPLE_CONFIGSET -configsetsDir $SOLR_TIP/server/solr/configsets
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1

View File

@ -715,8 +715,10 @@ IF "%FG%"=="1" (
) )
set EXAMPLE_NAME=%EXAMPLE%
set CREATE_EXAMPLE_CONFIG= set CREATE_EXAMPLE_CONFIG=
IF "%EXAMPLE%"=="schemaless" ( IF "%EXAMPLE%"=="schemaless" (
set EXAMPLE_NAME=gettingstarted
set CREATE_EXAMPLE_CONFIG=data_driven_schema_configs set CREATE_EXAMPLE_CONFIG=data_driven_schema_configs
) )
IF "%EXAMPLE%"=="techproducts" ( IF "%EXAMPLE%"=="techproducts" (
@ -728,12 +730,12 @@ IF NOT "!CREATE_EXAMPLE_CONFIG!"=="" (
IF "%SOLR_MODE%"=="solrcloud" ( IF "%SOLR_MODE%"=="solrcloud" (
"%JAVA%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ "%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\*" ^ -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 -config !CREATE_EXAMPLE_CONFIG! -configsetsDir "%SOLR_SERVER_DIR%\solr\configsets" -solrUrl http://localhost:%SOLR_PORT%/solr
) ELSE ( ) ELSE (
"%JAVA%" -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^ "%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\*" ^ -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" -config !CREATE_EXAMPLE_CONFIG! -configsetsDir "%SOLR_SERVER_DIR%\solr\configsets"
) )
) )