-
Notifications
You must be signed in to change notification settings - Fork 22
Deploying Solr
Numishare requires Apache Solr to power its public user interface. At the time of the publication of these instructions, the current version of Solr is 9.7.0. Within /usr/local/projects/numishare/ ($NUMISHARE_HOME), you will find a solr-home folder. Inside solr-home are folders that correspond to the Solr schema version, 1.6 and 1.7. The 1.7 folder includes configurations current to Solr 9.7.0 (November 2024).
The following instructions are for modern versions of Solr that run as a separate start-up service (by default, under port 8983) rather than a Tomcat WAR file (discontinued following Solr 4.10 in 2016). $NUMISHARE_HOME/solr-home/1.7 contains a conf folder. Conf includes all of the configuration files necessary for that particular version of Solr. The schema.xml file contains a list of fields necessary for text searching in Numishare, faceting browsing, mapping, and other such queries. By default, Solr outputs JSON, but the solrconfig.xml has been changed to output XML to avoid significant rewriting of XSLT throughout Numishare.
Important: In 1.7 (or different schema version numbers), create a “data” folder and assign permissions which will grant the Solr service write access. When following the instructions below to set up Solr as a start-up service, a 'solr' user will be given write access to these folders.
- Download the latest version of Solr
- Unzip to the filesystem and follow Solr's documentation to establish Solr as a start-up web service on the server, which by default will install Solr to /opt/solr and will create /var/solr as a separate directory for indexed data.
- In Solr 9.x Solr needs write access to directories that are symlinked in $SOLR_HOME. Edit
vi /etc/default/solr.in.shand setSOLR_SECURITY_MANAGER_ENABLED=false(and comment the line). Restart Solr after making the change.
- Make Solr folders in Numishare writeable by the user bound to the Solr web service:
sudo chown -R solr:solr /usr/local/projects/numishare/solr-home/1.7/ - Navigate to
/var/solr/dataand create a symlink in order to create a core for Numishare:ln -s /usr/local/projects/numishare/solr-home/1.7/ numishare - Log into the Solr administrative panel, http://servername:8983, and navigate to the Core Admin Tab. Create a new core named
numisharewith an instanceDir ofnumishare, a dataDir ofdata(relative path to the instanceDir), config ofsolrconfig.xmland schema ofschema.xml. - This will now activate a core for Numishare accessible at http://servername:8983/solr/numishare/, which should be updated in the config/settings for Numishare projects.