Old Release

This documentation covers an old version of Fedora. 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

Version 1 Next »

The FileSerializer listens to the repository generated JMS events to convert metadata to SOLR document with field names and persist it to the file system. It implements the org.fcrepo.indexer.Indexer interface for the indexing functionalities, which consists of the methods to handle new/updated records and deleted records.


The FileSerializer serializes the converted SOLR document format with field names under the configured directory file.serializer.dir, which is in flat structure with a file name that concatenates the id and the timestamp like id@yyyyMMddHHmmss.

Configuration

The indexer is configured using Spring that can be done using Java bean setter methods.  Here is a sample configuration fragment showing how to configure and use it:

  <!-- file serializer -->
  <bean id="fileSerializer" class="org.fcrepo.indexer.FileSerializer">
    <property name="path" value="${file.serializer.dir:./target/test-classes/fileSerializer/}"/>
  </bean>
 
  <!-- Main indexer class that processes events, gets RDF from the repository and convert it to SOLR document format, then calls the workers -->
  <bean id="indexerGroup" class="org.fcrepo.indexer.IndexerGroup">
    <constructor-arg name="repositoryURL" value="http://${fcrepo.host:localhost}:${fcrepo.port:8080}${fcrepo.context:/}rest" />
    <constructor-arg name="indexers">
      <set>
        ...
        <ref bean="fileSerializer"/>
        ...
      </set>
    </constructor-arg>
    ...
  </bean>
  • No labels