This guide will help you get up and running with a Fedora 4 instance whose updates are automatically indexed in a Solr repository. This guide glosses over many details and should be considered a starting point for using this feature. The document assumes a POSIX operating system with cURL, a text editor, Java, and a download of Apache Solr 4.10.3.
Install and Start Fedora 4
- Fedora 4 is running on port 8080 at context "fcrepo" (with JMS events published at port 61616)
- Your Fedora instance has the transform service enabled. Since the transform service is not available in the core Fedora webapp, you will likely need to use the Fedora Webapp Plus.
- You should be able to view Fedora in a web browser at the following URL: http://localhost:8080/fcrepo/rest
Install, Configure and Start Solr
The location of your untarred Solr installation will be hereinafter referenced as $SOLR_HOME.
Update Solr schema
- Navigating to the following URL in a web browser should show the Solr administrative interface: http://localhost:8983/solr/
Install and Start Karaf
The location of your untarred Karaf installation will be hereinafter referenced as $KARAF_HOME.
After running the command above
- you should be presented with some ASCII art in your terminal and
you should be put into the Karaf client shell, such as:
Note, to exit the Karaf client shell, type:
CTRL-D. This will stop the Karaf server, ending the indexing process.
To run Karaf as a system service please refer to the Karaf Service Wrapper documentation.
Install, Configure and Start Fedora Camel Toolbox
In the Karaf client shell type the following:
Verify - Toolbox Installation
Still in the Karaf client shell, the following command
should result in both the
fcrepo-indexing-solr features being in the
Verify - LDPath
- You should be able to create and navigate to an existing Fedora resource in the web browser, for example http://localhost:8080/fcrepo/rest/collection
- Assuming the resource is named "collection", you should be able to verify that the LDPath service is enabled by navigating to the following URL in a web browser: http://localhost:9086/ldpath/collection
You should see a JSON document such as:
The main configuration of the
fcrepo-indexing-solr feature is found at:
You will need to make updates to this configuration file if any of the following are true:
- Your Solr is deployed at a URL different than the one detailed earlier in this document
- Your Fedora is deployed at a URL different than the one detailed earlier in this document
- Your Fedora has Authorization enabled, e.g. WebAC
For configuration details, please refer to the documentation found at the fcrepo-indexing-solr github page. If you updated the
$KARAF_HOME/etc/org.fcrepo.camel.indexing.solr.cfg file, it is quite likely that you will also need to update the
$KARAF_HOME/etc/org.fcrepo.camel.ldpath.cfg file, particularly the sections related to Fedora location and authorization. Please refer to the fcrepo-ldpath page on github for configuration details.
You should now be able to create/update/delete resources in your Fedora repository, and subsequently see them in your Solr index!
For debugging purposes, you may want to inspect the logs of the various applications:
- Fedora log (unless configured otherwise):
- Solr log:
- Karaf log: