lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gora Mohanty <>
Subject Re: Put straight to a copyfield
Date Fri, 07 Dec 2012 08:10:32 GMT
On 6 December 2012 17:40, Spadez <> wrote:
> Hi,
> I currently have this setup:
> Bring in data into the "description" schema and then have this code:
> <copyField source="description" dest="truncated_description"
> maxChars="168"/>
> To then truncate the description and move it to "truncated_description".
> This works fine.
> I was wondering, is it possible so that when I bring in data from another
> source I actually bring it straight in to "truncated_description", like
> this:
> DIH Source 1: Bring into "description" and copyfield moves it to
> "truncated_description"
> DIH Source 2: Bring pre-truncated description straight into
> "truncated_description"

Yes, instead of using a copyField directive, you could import the data
straight into the destination field of the copyField. There is nothing
special about the destination field, and it behaves just as another
index field. Of course, you would need to do the truncation outside
Solr, or through a script transformer.

Maybe it would help if you explained what you wanted to achieve.
In general, a copyField should be faster than a separate DIH entity.


View raw message