Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Change from jms-indexer to fcrepo-message-consumer

...

Code Block
languagexml
titlesolrconfig.xml
firstline132
linenumberstrue
  <!-- 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"/> -->
Warning

The fcrepo-jmsmessage-indexer-pluggable consumer SolrIndexer implementation does not commit upon updates.  In order to see the changes, you must configure Solr to have a commit strategy that is appropriate for your use.  Node removal events do trigger a commit.

...

Code Block
titlesolr-fields.json
 [{"name":"uuid","type":"text_general","stored":"true","indexed":"true"}] 

 

Download, Build, Configure and Start fcrepo-

...

message-

...

consumer

Code Block
languagebash
git clone git@github.com:futuresfcrepo4/fcrepo-jmsmessage-indexer-pluggableconsumer.git
Edit the configuration at fcrepo-jmsmessage-indexer-pluggableconsumer/fcrepo-jmsmessage-indexerconsumer-webapp/src/main/resources/spring/indexer-core.xml to point to your solrSolr installation.
Code Block
languagexml
firstline31
linenumberstrue
  <!-- Solr Indexer START-->
  <bean id="solrIndexer" class="org.fcrepo.indexer.solr.SolrIndexer">
    <constructor-arg ref="solrServer" />
  </bean>
  <!--External Solr Server  -->
  <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>
  <!-- Solr Indexer END-->

  <!-- Message Driven POJO (MDP) that manages individual indexers -->
   <bean id="indexerGroup" class="org.fcrepo.indexer.IndexerGroup">
    <constructor-arg name="indexers">
      <set>
      <!--
        <ref bean="jcrXmlPersist"/>
        <ref bean="fileSerializer"/>
        <ref bean="sparqlUpdate"/> -->
        <!--To enable solr Indexer, please uncomment line below  -->
        <ref bean="solrIndexer"/>
      </set>
    </constructor-arg>

    <!-- If your Fedora instance requires authentication, enter the
         credentials here. Leave blank if your repo is open. -->
    <constructor-arg name="fedoraUsername" value="${fcrepo.username:}" /> <!-- i.e., manager, tomcat, etc. -->
    <constructor-arg name="fedoraPassword" value="${fcrepo.password:}" />
  </bean>

...

Code Block
languagebash
mvn clean install -DskipTests
cd fcrepo-jmsmessage-indexerconsumer-webapp
mvn -Djetty.port=9999 jetty:run

...