You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by srinalluri <na...@yahoo.com> on 2012/11/16 22:50:05 UTC
Solr 4:How to call a updateRequestProcessorChain during the
/dataimport?
I have a new updateRequestProcessorChain called 'bodychain'. (Please note
CountFieldValuesUpdateProcessorFactory is new in Solr 4). I want to call
this bodychain during the dataimport.
<updateRequestProcessorChain name="bodychain">
<processor class="solr.CloneFieldUpdateProcessorFactory">
<str name="source">body</str>
<str name="dest">body_count</str>
</processor>
<processor class="solr.CountFieldValuesUpdateProcessorFactory">
<str name="fieldName">body_count</str>
</processor>
<processor class="solr.DefaultValueUpdateProcessorFactory">
<str name="fieldName">body_count</str>
<int name="value">0</int>
</processor>
</updateRequestProcessorChain>
Following is the my dataimport handler, which is already having
'update.chain'. I think I can't give more than one update.chain in this
handler. When can I add 'bodychain'?
<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="update.chain">dedupe</str>
<str name="config">data-config.xml</str>
</lst>
</requestHandler>
thanks
Srini
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-How-to-call-a-updateRequestProcessorChain-during-the-dataimport-tp4020812.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr 4:How to call a updateRequestProcessorChain during the
/dataimport?
Posted by Chris Hostetter <ho...@fucit.org>.
: Following is the my dataimport handler, which is already having
: 'update.chain'. I think I can't give more than one update.chain in this
Correct, you can only specify a single chain when doing an update.
You have to decide which parts of your existing "dedupe" chain you want to
use inconjunction with your "bodychain" and in what order and make a
single chain representing that logic.
based on what your body chain looks like (no RunUpdateProcessor or
LogUpdateProcessor) i'm guessing you don't really need that to be it's own
chain at all -- just add those processors to your dedupe chain.
: <requestHandler name="/dataimport"
: class="org.apache.solr.handler.dataimport.DataImportHandler">
: <lst name="defaults">
: <str name="update.chain">dedupe</str>
: <str name="config">data-config.xml</str>
: </lst>
: </requestHandler>
-Hoss
Re: Solr 4:How to call a updateRequestProcessorChain during the /dataimport?
Posted by Erick Erickson <er...@gmail.com>.
I would _guess_ (but haven't done this with DIH) that simply putting
the body.chain in the updatehandler (<updateHandler
class="solr.DirectUpdateHandler2">)
would do what you want.
But that's purely a guess at this point on my part.
Anyone want to correct me?
Best
Erick
On Fri, Nov 16, 2012 at 4:50 PM, srinalluri <na...@yahoo.com> wrote:
> I have a new updateRequestProcessorChain called 'bodychain'. (Please note
> CountFieldValuesUpdateProcessorFactory is new in Solr 4). I want to call
> this bodychain during the dataimport.
>
> <updateRequestProcessorChain name="bodychain">
> <processor class="solr.CloneFieldUpdateProcessorFactory">
> <str name="source">body</str>
> <str name="dest">body_count</str>
> </processor>
> <processor class="solr.CountFieldValuesUpdateProcessorFactory">
> <str name="fieldName">body_count</str>
> </processor>
> <processor class="solr.DefaultValueUpdateProcessorFactory">
> <str name="fieldName">body_count</str>
> <int name="value">0</int>
> </processor>
> </updateRequestProcessorChain>
>
> Following is the my dataimport handler, which is already having
> 'update.chain'. I think I can't give more than one update.chain in this
> handler. When can I add 'bodychain'?
>
> <requestHandler name="/dataimport"
> class="org.apache.solr.handler.dataimport.DataImportHandler">
> <lst name="defaults">
> <str name="update.chain">dedupe</str>
> <str name="config">data-config.xml</str>
> </lst>
> </requestHandler>
>
> thanks
> Srini
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-4-How-to-call-a-updateRequestProcessorChain-during-the-dataimport-tp4020812.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>