On Wed, Jul 27, 2011 at 7:20 AM, solruser@9913 <gunaranj...@yahoo.com> wrote:
> This may be a trivial question - I am noob :).
> In the dataimport of a CSV file, am trying to assign a field based on a
> conditional check on another field.
>
> E.g.
>   <field name="rawLine" regex="CSV-splitting-regex" groupNames="X,Y,Z" />
>
>   this works well.  However I need to create another field A that is
> assigned a value based on X.
[...]

A ScriptTransformer should do the job. Please see
http://wiki.apache.org/solr/DataImportHandler#ScriptTransformer

Regards,
Gora

Reply via email to