SobekCM Repository Community Help
SobekCM Repository

Solr/Lucene Installation and Configuration


The Solr/Lucene indexes are used for all full-text searching and (as of version 5.0) all general metadata searches. In addition, this version does map coordinate searching, user folders, and really anything else that interacts with the metadata through the web interface.

In previous versions, metadata and coordinate searching was slowly transitioning from database searchs to solr, but that transition is now complete, vastly simplifying the database schema and stored procedures. Therefor, Solr is mandatory for ANY searching within SobekCM now.

Software Installs

Installation of the following software packages is required for the Solr/Lucene index server:

  1. Java ( we currently use Java 25 )

  2. Solr engine that is supported by Solr.NET. Version 7.1.0 of Solr is the most tested with SobekCM

As mentioned, the use of the SolrNet library prevents us from updating to the very latest solr engine (version 10). This should be corrected in the version 5.1 release.

Solr/Lucene Configuration

There are two Solr/Lucene indexes used, one for searching within ALL documents, and one for searching within a single document. Because of this, you will be running a multi-core instance of Solr/Lucene. Steps below indicate how to configure your instance of Solr/Lucene and install the SobekCM indexes. Below are also sites which may assist you with more detail on the configuration:

  1. Download Version 7.1.0 of solr and unzip into your local drive. This documentation assumes you unzipped it into C:\solr-7.1.0, but you can really put it anywhere.

  2. Copy the two Configuration folders (found in the Github repo under SobekCM-Web-Application\Solr) into the solr server folder ( C:\solr-7.1.0\server\solr ). One core is for searching documents and the second for searching pages within a document) into the solr server. These folders have the full schema information for the cores. The exact locations of the two Configuration folders to copy is SobekCM-Web-Application\Solr\pages\Configuration\test_pages and SobekCM-Web-Application\Solr\documents\Configuration\test_documents.

  3. Create folders where you would like to keep the indexes, again one for the documents and another for the pages.

  4. Now, you need to tell the folders under the server/solr where the indexes will be kept. So, go into the two schema folders and edit the core.properties file. Found at C:\solr-7.1.0\server\solr\test_documents and C:\solr-7.1.0\server\solr\test_pages. You will want to update the dataDir value to point where the indexes should go.

  5. Start solr running by going to the C:\solr-7.1.0\bin and typing 'solr start'. To stop solr, you can run 'solr stop -all' if you don't have anything else using solr on that machine.

  6. Navigate to http://localhost:8983/solr/ to test the setup

Additional Resources

I found the following two sites very useful for configuring Solr/Lucene correctly the first time, which admittedly was quite a while ago.