Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Implement the indexing functionality using the org.fcrepo.indexer.Indexer interface, which consists of only two methods (one to handle new/updated records, and another to handle deleted records).  Any configuration required should be done using Java bean setter methods.
  2. Update the Spring configuration to add a bean referencing the new class and providing the configuration properties needed.
  3. Add the bean to the list of workers invoked by the indexer.

Anchor
install-steps
install-steps
Trying Out the Indexer

To get hands-on experience with the indexer and see updates synced with an external triplestore, you need three components. Each component will potentially run in its own application container. The three components are:

...

If the Fedora Repository is be running at http://localhost:8080/rest/  – you can create, update and delete objects and datastreams using your browser, or using the REST API (see SPARQL Recipes ).  Each event will trigger the indexer and be synced to Fuseki (or Sesame), which you can access at  http://localhost:3030/  (if you have Fuseki running on its default port).

Indexing Multiple Repositories

...

Reindexing

Warning

This feature is unreleased, and only available by downloading and building jms-event-listener from Github.

...

Indexing Multiple Repositories to a single Triplestore

To have an external triplestore spanning multiple repositoriesIn some situations it is desirable to have multiple Fedora repositories all feeding into a single external triplestore. In order to accomplish this, we need to install and setup the three components (Triplestore, Fedora 4 Repository and JMS Event listener/indexeindexer) as follows:

  1. Follow the instructions above to install the triplestore (Fuseki or Sesame) in one machine and start it.

  2. Follow the instructions above to install two or more Fedora 4 Repositories in different machines and start them.

  3. Install JMS Event listener/indexer (https://github.com/futures/fcrepo-jms-indexer-pluggable) for each Fedora 4 repository installation and start the indexer with the following command:

    Code Block
    languagebash
    $ mvn -D jetty.port=9999 -Dfuseki.host=<triplestore.host.name> -Dfcrepo.host=<repository.host.name> jetty:run
  4. Notes -

    • To make an object indexable in the triplestore, the object need needs to be include indexable mixin type: http://fedora.info/definitions/v4/indexing#indexable, which can be inserted through a SPARQL insert:

      Code Block
      INSERT {<> <http://www.w3.org/1999/02/22-rdf-syntax-
      ns#type> <http
      ns#type> <http://fedora.info/definitions/v4/
      indexing#indexable>
      indexing#indexable> }.
    • Start the triplestore first. If the triplestore is restarted, then the JMS Event listener/indexer need restart needs to be restarted, too.