lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "UpdateRequestProcessor" by SimonRosenthal
Date Thu, 04 Aug 2011 17:16:21 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "UpdateRequestProcessor" page has been changed by SimonRosenthal:
http://wiki.apache.org/solr/UpdateRequestProcessor?action=diff&rev1=8&rev2=9

  The [[http://lucene.apache.org/solr/api/org/apache/solr/update/processor/UpdateRequestProcessor.html|UpdateRequestProcessor]]
defines how an update request is processed before it is indexed by the update handler.
  
  == Configuring UpdateRequestProcessors ==
- solrconfig.xml will load a UpdateRequestProcessors
+ solrconfig.xml will load a UpdateRequestProcessorChain
  
  {{{
-  <updateRequestProcessorChain>
+  <updateRequestProcessorChain name="mychain" >
      <processor class="solr.CustomUpdateRequestProcessorFactory" >
     <lst name="name">
       <str name="n1">x1</str>
       <str name="n2">x2</str>
     </lst>
    </processor>
- 
     <processor class="solr.RunUpdateProcessorFactory" />
     <processor class="solr.LogUpdateProcessorFactory" />
   </updateRequestProcessorChain>
+ 
+   <!-- referencing it in an update handler -->
+   <requestHandler name="/update/processortest" class="solr.JsonUpdateRequestHandler"
>
+     <lst name="defaults">
+       <str name="update.processor">mychain</str>
+       <!-- as of 4.0, use "update.chain" -->
+     </lst>
+   </requestHandler>
+ 
  }}}
  == Implementing a conditional copyField ==
  Here is a quick example that adds the 'cat' 'popular' if the value of 'popularity' is >
5

Mime
View raw message