Answered my own qs, I think:

Trying to build a simple UpdateRequestProcessor that keeps a field (the time of original index) when overwriting a document.

1) Can I make a updateRequestProcessor chain only work as a certain handler or does putting the following in my solrconfig.xml:

<updateRequestProcessorChain>
   <processor class="myspecial.KeepIndexedDateFactory" >
  <processor class="solr.RunUpdateProcessorFactory" />
  <processor class="solr.LogUpdateProcessorFactory" />
</updateRequestProcessorChain>

Just handle all document updates?



What you have to do is:

<requestHandler name="/update2" class="solr.XmlUpdateRequestHandler" >
    <lst name="invariants">
     <str name="update.processor">KeepIndexed</str>
    </lst>
  </requestHandler>

<updateRequestProcessorChain name="KeepIndexed">
    <processor class="myspecial.KeepIndexedDateFactory"/>
   <processor class="solr.RunUpdateProcessorFactory" />
   <processor class="solr.LogUpdateProcessorFactory" />
</updateRequestProcessorChain>

And then calls to /update2 will go through the chain. Calls to /update will not.



2) Does a UpdateRequestProcessor support inform ?


No, not that I can tell. And the factory won't get instantiated until the first time you use it.





Reply via email to