0

I'm trying to update Index in Hybris. Due to bad document it skip whole update operation. But I want to skip only bad document and rest of the document must be updated.

By searching on google I found the solution here https://issues.apache.org/jira/browse/SOLR-445

Provided Solution is:

<processor class="solr.TolerantUpdateProcessorFactory">
<int name="maxErrors">10</int>
</processor>

Now I don't know Exactly where to put this code in Hybris SolrConfiguration. I need steps to implement this in Hybris Solr Config.

1 Answers1

0

By default, hybris doesn't use any update request processor, they are deactivated in the solrconfig.xml file, so to use this solr feature you should.

  1. Define your update request processor in the ${HYBRIS_CONFIG}/solr/instances/default/configsets/default/conf/solrconfig.xml
  <!-- Update Processors

   Chains of Update Processor Factories for dealing with Update
   Requests can be declared, and then used by name in Update
   Request Processors

   http://wiki.apache.org/solr/UpdateRequestProcessor

-->
<processor class="solr.TolerantUpdateProcessorFactory">
    <int name="maxErrors">10</int>
</processor>
  1. Once the update request is defined you have to use it as request parameter when posting the document as specified in solr documentation: Define a new implementation of solr client that passes the request processor as a new parameter

  2. Define a new spring bean that overrides the method getClientForIndexing to return a Pool of the new solr client .