Child pages
  • Fedora Solr Index
Skip to end of metadata
Go to start of metadata

Deploy Solr with Tomcat

Deploying Solr with Tomcat follows the steps similar to other web applications except that we have to setup $solr_home.

1. Download Solr, unzip, and save the output to a temp folder (solr_temp)

2. copy the war file (e.g., apache-solr-1.4.1.war) from $solr_temp\ dist to $CATALINA_HOME\webapp\solr.war

3. Create $solr_home, and conf directory in $solr_home that contains at least two files: schema.xml and solrconfig.xml (use $solr_temp\example\solr as template)

4. the $solr_home directory needs to be pointed as JAVA OPTS, in Windows it will be one line like the follow in the CATALINA.bat:

 set JAVA_OPTS=%JAVA_OPTS% -Dsolr.solr.home="c:\solr"

5. start Tomcat and make Solr is running with this URL:


Configure Solr

For our development, we use Solr in a single-core setup (i.e., we use the same index/search configuration for all collections). Check out the configuration used for our development via:


Both schema.xml and solrconfig.xml are required by Solr, and we also include the style sheet that will convert METS to Solr XML(mets-solr/xsl) in the conf/xslt 

Solr Indexer

A Solr indexing client is programmed and distributed as a part of the fedora-index-service, and you can check out the entire package as a whole via:


The source code of the Solr indexer is in


in your check out directory.The Solr indexer also requires some configuration files, such as:,, and photocat-mets2solr.xslt in

The created Solr index will be saved in $solr_home/data

How Solr Indexer Works

Every time you update a Fedora item (e.g., using Photocat), Fedora will be notified and trigger the fedora-index-service via Java Messaging Service. The index service will pull out the item from the Fedora repository and use its own indexer to update the Lucene/Solr index. If the item is updated in Photocat, the index service will call the Solr indexer as setup in configuration and update Photocat's Solr index

  • No labels