Sounds like you need a "Template Transformer": "... it helps to concatenate multiple values or add extra characters to field for injection."

<entity name="e" transformer="TemplateTransformer" ..>
<field column="namedesc" template="hello${e.name},${eparent.surname}" />
...
</entity>

See:
http://wiki.apache.org/solr/DataImportHandler#TemplateTransformer

Or did you have something different in mind?

-- Jack Krupansky

-----Original Message----- From: okayndc
Sent: Saturday, May 05, 2012 9:12 AM
To: solr-user@lucene.apache.org
Subject: solr: adding a string on to a field via DIH

Hello,

Is it possible to concatenate a field via DIH?
For example for the id field, in order to make it unique
I want to add 'project' to the beginning of the id field.
So the field would look like 'project1234'
Is this possible?

<field column="id" name="id" />

Thanks

Reply via email to