Installing Fedora GSearch 2.0 with SOLR

Muradora relies on GSearch 2.0 with Solr plugin for performing its searches. GSearch 2.0 was developed by Gert Schmeltz Pedersen from Technical University of Denmark. We have made some changes to the original distribution in terms of its build process to better suit its deployment for use by Muradora.

Prerequisites

  1. You have a working Fedora installation.
  2. TOMCAT_HOME variable is defined and points to where your Tomcat installation is.
  3. Tomcat is shutdown.

Installing Solr

  1. Download Solr and unpack it your directory choice for $SOLR_HOME.
  2. Copy this schema.xml and place it in $SOLR_HOME/example/solr/conf/. Note: we will be using the default solr example instance. Hence the Solr index will be stored under the $SOLR_HOME/example/data directory.
  3. Create the $TOMCAT_HOME/conf/Catalina/localhost directory if it doesn't already exist.
  4. Create a new file there called solr.xml with the content below: (replacing SOLR_HOME with the path to $SOLR_HOME).
    <Context docBase="SOLR_HOME/example/webapps/solr.war" debug="0" crossContext="true" >
       <Environment name="solr/home" type="java.lang.String" value="SOLR_HOME/example/solr" override="true" />
    </Context>
    

Note: we don't need to copy solr.war from the Solr package into Tomcat, since there is already a version of solr.war that will be installed into Tomcat as part of GSearch installation below

Installing GSearch 2.0

  1. Download our modified version of GSearch 2.0, and unpack it into a temporary directory.
  2. Replace this configvalues.xml with the one in genericsearch-2.0/FgsConfig/configvalues.xml. Replace all occurrence of ADMIN_PASSWORD with the password for the fedoraAdmin user. Also replace all occurrence of SOLR_HOME with your $SOLR_HOME value from above.
  3. Build the war file and deploy it inside Tomcat:
        $ cd genericsearch-2.0/FedoraGenericSearch
        $ ant
        $ cp dist/fedoragsearch.war $TOMCAT_HOME/webapps/.
        $ mkdir $TOMCAT_HOME/webapps/fedoragsearch
        $ cd $TOMCAT_HOME/webapps/fedoragsearch
        $ jar -xf ../fedoragsearch.war
        $ ant -f configvalues.xml
    
  4. Copy the demoFoxmlToSolr.xml to $TOMCAT_HOME/webapps/fedoragsearch/WEB-INF/classes/config/index/DemoOnSolr/.
  5. Run this script on a shell (Note: replace the INSTALLER_DIR below with the full path to where you unpack genericsearch-2.0)
        $ REPLACE_FILES=`grep -rl "$INSTALLER_DIR" $TOMCAT_HOME/webapps/fedoragsearch`
        $ for i in $REPLACE_FILES
        do
            sed -e "s,${INSTALLER_DIR}/genericsearch-2.0/FgsBuild/webapp,${TOMCAT_HOME}/webapps/fedoragsearch," $i > $i.tmp
            mv $i.tmp $i
        done
    
  6. Copy the fedoragsearch.properties to $TOMCAT_HOME/webapps/fedoragsearch/WEB-INF/classes/config/fedoragsearch.properties. Replace all occurrence of ADMIN_PASSWORD with your "fedoraAdmin" password, and TOMCAT_HOME with the full path to where your Tomcat is installed.

Testing Solr and Fedoragsearch Deployments

  1. Startup Tomcat
  2. To test that Solr is deployed correctly, you can point your browser at "http://<HOSTNAME>:8080/solr/admin" (replacing HOSTNAME with your server hostname). This should bring up the administration page for Solr.
  3. To test that Fedoragsearch is deployed correctly, you can point your browser at "http://<HOSTNAME>:8080/fedoragsearch/rest" (again replacing HOSTNAME with your server hostname). This should bring up the Fedoragsearch administration page.

Muradora Integration

Edit the mura.properties file and set

fedoraGSearch.baseUrl = http://localhost:8080>/fedoragsearch/services/FgsOperations
solr.url=http://localhost:8080/solr

Detailed information can be found on the GUI Deployment Guide.


Back to Deployment Guides

Attachments