You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2011/09/11 19:05:19 UTC
[Solr Wiki] Update of "UpdateRequestProcessor" by JanHoydahl
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 JanHoydahl:
http://wiki.apache.org/solr/UpdateRequestProcessor?action=diff&rev1=9&rev2=10
{{{
<updateRequestProcessorChain name="mychain" >
- <processor class="solr.CustomUpdateRequestProcessorFactory" >
+ <processor class="solr.CustomUpdateRequestProcessorFactory" >
- <lst name="name">
+ <lst name="name">
- <str name="n1">x1</str>
+ <str name="n1">x1</str>
- <str name="n2">x2</str>
+ <str name="n2">x2</str>
- </lst>
+ </lst>
- </processor>
+ </processor>
<processor class="solr.RunUpdateProcessorFactory" />
<processor class="solr.LogUpdateProcessorFactory" />
</updateRequestProcessorChain>
+ }}}
+ == Selecting the UpdateChain for your request ==
+ Once one or more update chains are defined, you may select one on the update request through the parameter {{{update.chain}}} ( <!> Note that for pre-[[Solr3.2]] you need to use {{{update.processor}}} instead). Example: {{{http://localhost:8983/solr/update/xml?update.chain=mychain}}}. You may also choose to set a default UpdateChain for a certain UpdateRequestHandler:
+ {{{
- <!-- referencing it in an update handler -->
+ <!-- referencing it in an update handler -->
- <requestHandler name="/update/processortest" class="solr.JsonUpdateRequestHandler" >
+ <requestHandler name="/update/processortest" class="solr.JsonUpdateRequestHandler" >
- <lst name="defaults">
+ <lst name="defaults">
- <str name="update.processor">mychain</str>
+ <str name="update.chain">mychain</str>
- <!-- as of 4.0, use "update.chain" -->
- </lst>
+ </lst>
- </requestHandler>
+ </requestHandler>
+ }}}
- }}}
== Implementing a conditional copyField ==
Here is a quick example that adds the 'cat' 'popular' if the value of 'popularity' is > 5