Skip to content

Commit

Permalink
afford resetting core with environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Dec 8, 2020
1 parent 384050f commit 3cc5d44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions solr/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ if [[ "$VERBOSE" = "yes" ]]; then
set -x
fi

# allow easier reset core with `docker run -e RESET_CORE=true`
if [[ "$RESET_CORE" = "true" ]]; then
echo 'Removing core /opt/solr/server/solr/mycores/scholars-discovery'
rm -rf /opt/solr/server/solr/mycores/scholars-discovery
fi

if [ ! -f "/opt/solr/server/solr/mycores/scholars-discovery/core.properties" ]; then
start-local-solr
solr create -c scholars-discovery -d "/opt/solr/server/solr/configsets/scholars-discovery" -p 8983
Expand Down

0 comments on commit 3cc5d44

Please sign in to comment.