Install Solr core for drupal🔗
You can also copy from other core configs (/opt/solr/server/solr/$CORE/conf
)
- Make sure you have installed the newest solr and oracle's Java.
- Make sure
/opt/solr-VERSION
is owned bysolr
(chown -R solr:solr /opt/solr_VERSION
) - Make sure solr is started, or else core creation will not work: bin/solr start
- Go to your drupal site and make sure the Search API Solr module is installed.
- Click add server if there is no server.
- Give it a name
- Backend :
solr
- Standard should do
- Solr node:
localhost
- Solr port:
8983
- Solr collection: The name of the core you're about to make
- Run this command:
cd /path/to/drupal
mkdir -p /tmp/config/ && drush solr-gsc [NAME-OF-SERVER-YOU-CREATED-IN-DRUPAL] /tmp/config/config.zip [SOLR-VERSION] && cd /tmp/config && unzip config.zip
- Create core:
sudo -u solr /opt/solr/bin/solr create_core -c [CORE-NAME] -d /tmp/config -n [CORE-NAME]