Versions Compared

Key

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

The SolrIndexer listens to the repository JMS events to update the records in SOLR. 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 indexer It will first retrieve the RDF from the repository and , then convert it to SOLR document format with name fields , and then updates update the record in SOLR.

Configuration

The SolrIndexer is indexer is configured using Spring that can be done using Java bean setter methods.  Here is a sample fragment for configuring and using itthe SolrIndexer:

No Format
  <!-- Solr Indexer -->
  <bean id="solrIndexer" class="org.fcrepo.indexer.solr.SolrIndexer">
    <constructor-arg ref="solrServer" />
  </bean>

  <!-- Standardalone solr Server used by the Solr indexer  -->
  <bean id="solrServer" class="org.apache.solr.client.solrj.impl.HttpSolrServer">
    <constructor-arg index="0" value="http://${fcrepo.host:localhost}:${solrIndexer.port:8983}/solr/" />
  </bean>

  <!-- Message MainDriven indexerPOJO class(MDP) that processesmanages events, gets RDF from the repository and calls the workersindividual indexers -->
  <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="jcrXmlPersist"/>
        ...
      </set>
    </constructor-arg>
    ...
  </bean>