This repository was archived by the owner on Feb 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 77# `solr` in the `installed_extras`, and is currently set up for the D7 versions
88# of Apache Solr Search or Search API Solr.
99
10- SOLR_SETUP_COMPLETE_FILE=/etc/drupal_vm_solr_config_complete
10+ NAME=" d8"
11+ SOLR_SETUP_COMPLETE_FILE=" /etc/drupal_vm_solr_config_complete_$NAME "
1112
1213# Search API Solr module.
1314SOLR_DOWNLOAD=" http://ftp.drupal.org/files/projects/search_api_solr-8.x-1.x-dev.tar.gz"
1415SOLR_DOWNLOAD_DIR=" /tmp"
1516SOLR_MODULE_NAME=" search_api_solr"
1617SOLR_VERSION=" 5.x"
17- SOLR_CORE_PATH=" /var/solr/data/collection1 "
18+ SOLR_CORE_PATH=" /var/solr/data/$NAME "
1819
1920# Check to see if we've already performed this setup.
2021if [ ! -e " $SOLR_SETUP_COMPLETE_FILE " ]; then
2122 # Download and expand the Solr module.
2223 wget -qO- $SOLR_DOWNLOAD | tar xvz -C $SOLR_DOWNLOAD_DIR
2324
24- # Copy the Solr configuration into place over the default `collection1` core .
25- sudo cp -a $ SOLR_DOWNLOAD_DIR /$SOLR_MODULE_NAME /solr-conf/$SOLR_VERSION /. $SOLR_CORE_PATH /conf/
25+ # Copy new Solr collection core with the Solr configuration provided by module .
26+ sudo su - solr -c " /opt/solr/bin/solr create -c $NAME -d $ SOLR_DOWNLOAD_DIR /$SOLR_MODULE_NAME /solr-conf/$SOLR_VERSION /"
2627
2728 # Adjust the autoCommit time so index changes are committed in 1s.
2829 sudo sed -i ' s/\(<maxTime>\)\([^<]*\)\(<[^>]*\)/\11000\3/g' $SOLR_CORE_PATH /conf/solrconfig.xml
2930
30- # Fix file permissions.
31- sudo chown -R solr:solr $SOLR_CORE_PATH /conf
32-
3331 # Restart Apache Solr.
3432 sudo service solr restart
3533
You can’t perform that action at this time.
0 commit comments