lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: Adding a prefix to fields
Date Thu, 20 Aug 2009 13:41:04 GMT
On Thu, Aug 20, 2009 at 7:07 PM, ahammad <ahmed.hammad@gmail.com> wrote:

>
> Hello,
>
> Is it possible to add a prefix to the data in a Solr field? For example,
> right now, I have a field called "id" that gets data from a DB through the
> DataImportHandler. The DB returns a 4-character string like "ag5f". Would
> it
> be possible to add a prefix to the data that is received?
>

Easiest way is to use TemplateTransformer. The field definition can look
like:

<field column="id" template="Article_${entity.id}" />

-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message