org.apache.solr.update.processor

Class UpdateRequestProcessorChain

  • All Implemented Interfaces:
    PluginInfoInitialized


    public final class UpdateRequestProcessorChain
    extends Object
    implements PluginInfoInitialized
    Manages a chain of UpdateRequestProcessorFactories.

    Chains can be configured via solrconfig.xml using the following syntax...

     <updateRequestProcessorChain name="key" default="true">
       <processor class="package.Class1" />
       <processor class="package.Class2" >
         <str name="someInitParam1">value</str>
         <int name="someInitParam2">42</int>
       </processor>
       <processor class="solr.LogUpdateProcessorFactory" >
         <int name="maxNumToLog">100</int>
       </processor>
       <processor class="solr.RunUpdateProcessorFactory" />
     </updateRequestProcessorChain>
     

    Multiple Chains can be defined, each with a distinct name. The name of a chain used to handle an update request may be specified using the request param update.chain. If no chain is explicitly selected by name, then Solr will attempt to determine a default chain:

    Almost all processor chains should end with an instance of RunUpdateProcessorFactory unless the user is explicitly executing the update commands in an alternative custom UpdateRequestProcessorFactory. If a chain includes RunUpdateProcessorFactory but does not include a DistributingUpdateProcessorFactory, it will be added automatically by init().

    Since:
    solr 1.3
    See Also:
    UpdateRequestProcessorFactory, init(org.apache.solr.core.PluginInfo), createProcessor(org.apache.solr.request.SolrQueryRequest, org.apache.solr.response.SolrQueryResponse)