mirror of https://github.com/apache/lucene.git
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:
parent
aec7811b66
commit
27f8a4649d
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue