Setting up ignore commits from client applications

Care should be taken in SolrCloud mode: the client application should not send explicit commit requests. Instead, we should set auto commits to make updates visible, ensuring that auto commits happen at regular intervals in the cluster. 

However, it is not feasible to go and update all applications to stop them from sending explicit commits. Solr provides IgnoreCommitOptimizeUpdateProcessorFactory, which will ignore all explicit commits without touching the client application. The change is done in solrconfig.xml, as shown here:

<updateRequestProcessorChain name="ignore-commit-from-client" default="true">
<processor class="solr.IgnoreCommitOptimizeUpdateProcessorFactory">
<int name="statusCode">200</int>
</processor>
<processor class="solr.LogUpdateProcessorFactory" />
<processor class="solr.DistributedUpdateProcessorFactory" />
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>

In the preceding snippet, we return status 200 to the client but ignore the commit.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.152.241