11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

updateRequestProcessorChain<br />

<br />

<br />

true<br />

id<br />

false<br />

name,features,cat<br />

solr.processor.Lookup3Signature<br />

<br />

<br />

<br />

<br />

In the above example, a new update processor chain named "dedupe" is created with<br />

SignatureUpdateProcessorFactory, LogUpdateProcessorFactory and RunUpdateProcessorFactory in the chain.<br />

The SignatureUpdateProcessorFactory is further configured with different parameters such as "signatureField",<br />

"overwriteDupes" etc. This chain is an example of how <strong>Solr</strong> can be configured to perform de-duplication of<br />

documents by calculating a signature using the value of name, features, cat fields which is then used as the "id"<br />

field. As you may have noticed, this chain does not specify the DistributedUpdateProcessorFactory - because<br />

this processor is critical for <strong>Solr</strong> to operate properly, <strong>Solr</strong> will automatically insert DistributedUpdateProcessorFac<br />

tory in this chain that does not include it just prior to the RunUpdateProcessorFactory.<br />

RunUpdateProcessorFactory<br />

Do not forget to add RunUpdateProcessorFactory at the end of any chains you define in solrconfig.xml<br />

otherwise update requests processed by that chain will not actually affect the indexed data.<br />

Configuring individual processors as top-level plugins<br />

Update request processors can also be configured independent of a chain in solrconfig.xml.<br />

updateProcessor<br />

<br />

true<br />

id<br />

false<br />

name,features,cat<br />

solr.processor.Lookup3Signature<br />

<br />

<br />

In this case, an instance of SignatureUpdateProcessorFactory is configured with the name "signature" and a<br />

RemoveBlankFieldUpdateProcessorFactory is defined with the name "remove_blanks". Once the above has<br />

been specified in solrconfig.xml, we can be refer to them in update request processor chains in solrconfig.xml as<br />

follows:<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

460

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!