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 of the details and should be considered a starting point for testing this feature. The document assumes a POSIX operating system with cURL, a text editor, Java, Git, and a download of Apache Solr 4.6.0.
The pattern for integrating Solr with Fedora 4 is to take advantage of the messages that Fedora 4 emits after every change to resources within the repository. The assumption is that you have three components running independently, in a completely decoupled fashion:
The Indexing service:
The most current documentation for the Indexing service can be found on GitHub.
This guide assumes Fedora 4 is running on port 8080 (with JMS listening on port 61616).
wget http://mirror.cogentco.com/pub/apache/lucene/solr/4.6.0/solr-4.6.0.tgz tar -xzf solr-4.6.0.tgz |
Edit solr-4.6.0/example/solr/collection1/conf/solrconfig.xml, un-commenting the schemaFactory element in lines 134-37, and commenting out the schemaFactory element in line 151, as shown below:
<!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>: --> <schemaFactory class="ManagedIndexSchemaFactory"> <bool name="mutable">true</bool> <str name="managedSchemaResourceName">managed-schema</str> </schemaFactory> <!-- When ManagedIndexSchemaFactory is specified, Solr will load the schema from the resource named in 'managedSchemaResourceName', rather than from schema.xml. Note that the managed schema resource CANNOT be named schema.xml. If the managed schema does not exist, Solr will create it after reading schema.xml, then rename 'schema.xml' to 'schema.xml.bak'. Do NOT hand edit the managed schema - external modifications will be ignored and overwritten as a result of schema modification REST API calls. When ManagedIndexSchemaFactory is specified with mutable = true, schema modification REST API calls will be allowed; otherwise, error responses will be sent back for these requests. --> <!-- <schemaFactory class="ClassicIndexSchemaFactory"/> --> |
Start Solr and verify that it is running at http://localhost:8983/solr.
cd solr-4.6.0/example java -jar start.jar |
See documentation