Archived

If you are looking for the last documentation in the 4.x series, see 4.7.5. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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, and a download of Apache Solr 4.10.3.

Install and Start Fedora 4

Assumptions

  • Fedora 4 is running on port 8080 at context "fcrepo" (with JMS listening on port 61616)
  • Your Fedora 4 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.

Verify

  1. You should be able view Fedora in a web browser at the following URL: http://localhost:8080/fcrepo/rest
  2. Create a resource or navigate to an existing Fedora resource in the web browser, for example http://localhost:8080/fcrepo/rest/collection
  3. Assuming the resource is named "collection", you can verify that the transform service is enabled by navigating to the following URL in a web browser: http://localhost:8080/fcrepo/rest/collection/fcr:transform/default
    1. You should see a json document such as:

      [{"created":["2016-06-01T18:04:41.859Z"],"has_parent":["http://localhost:8080/fcrepo/rest/"],"id":["http://localhost:8080/fcrepo/rest/collection"],"title":[],"last_modified":["2016-06-01T18:04:41.859Z"]}]

Install, Configure and Start Solr

Dowload Solr

wget http://archive.apache.org/dist/lucene/solr/4.10.3/solr-4.10.3.tgz
tar -xzvf solr-4.10.3.tgz

The location of your untarred Solr installation will be furthermore be referenced as $SOLR_HOME.

Update Solr schema

wget https://raw.githubusercontent.com/fcrepo4-exts/fcrepo4-vagrant-base-box/master/config/schema.xml
cp schema.xml $SOLR_HOME/example/solr/collection1/conf/

Start Solr

cd $SOLR_HOME/example
java -jar start.jar

Verify

Install, Configure and Start Karaf

 

 

Create an Indexable resource

curl -v -X PUT -H "Content-Type: text/turtle" --data-binary "@object.rdf" "http://localhost:8080/rest/indexableObject" 
object.rdf
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX indexing: <http://fedora.info/definitions/v4/indexing#>

<> indexing:hasIndexingTransformation "default"; rdf:type indexing:Indexable; dc:title "This title will show up in the index."

Ensure that the records are committed to Solr (either through an explicit commit or waiting until the configured commit period is up) and then verify that they show up.

  • No labels