Hi Alex,

That seems fair.  The only downside I can think of is that I have to include 
the copyField URP in every request handler that imports data.  Not convenient 
but not a big problem either.

Do you happen to know the name of the URP that performs the copyField 
functionality?  I looked through the list at 
(http://www.solr-start.com/info/update-request-processors/) but don't see one 
that obviously fills the role (sorry if I missed something obvious).

I could easily write one using the script URP but that sounds like it would be 
much less performant than something built in.

Thanks,
Douglas


> -----Original Message-----
> From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
> Sent: Friday, September 12, 2014 1:36 PM
> To: solr-user
> Subject: Re: Running an updateProcessor after copyField has occurred?
> 
> If you do copyField equivalent in the request processor (there is a
> URP for that) before the script one, you would then not need to do the
> copyField in the schema. So, a move, not a duplicate.
> 
> Or are things more complicated than that?
> 
> Regards,
>    Alex.
> Personal: http://www.outerthoughts.com/ and @arafalov
> Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
> Solr popularizers community:
> https://www.linkedin.com/groups?gid=6713853
> 
> 
> On 12 September 2014 15:49, Douglas Stonham
> <douglas.ston...@software.dell.com> wrote:
> > I'm using the StatelessScriptUpdateProcessorFactory to run a script against
> data as it is imported.
> >
> > Some relevant pieces from solrconfig.xml:
> >
> >         <requestHandler name="/dataimport"
> class="org.apache.solr.handler.dataimport.DataImportHandler">
> >                 <lst name="defaults">
> >                         <str name="config">data-config.xml</str>
> >                         <str name="update.chain">textCopyByLang</str>
> >                 </lst>
> >         </requestHandler>
> >
> >         <updateRequestProcessorChain name="textCopyByLang">
> >                 <processor 
> > class="solr.StatelessScriptUpdateProcessorFactory">
> >                         <str name="script">textCopyByLang.js</str>
> >                 </processor>
> >                 <processor class="solr.LogUpdateProcessorFactory" />
> >                 <processor class="solr.RunUpdateProcessorFactory" />
> >         </updateRequestProcessorChain>
> >
> > In schema.xml I have a number of fields all being combined into one "text"
> field using copyField.  Unfortunately this apparently doesn't happen until
> after the processor chain has completed so the script can't make use of the
> combined text.
> >
> > i.e.
> >         doc = cmd.solrDoc;
> >         text = doc.getFieldValue("text");  // text is null
> >
> >
> > Is there a way around this without duplicating all the copyFields inside the
> processing script?
> >
> > Thanks,
> >
> > Douglas

Reply via email to