lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vernon Chapman <>
Subject Re: DIH; Hardcode field value/replacement based on source column
Date Tue, 31 Mar 2009 16:11:20 GMT

I'm not sure but if what you want is to have Video in the field I would do
something in the sql query.

I use postgres and I needed all my calendar event items to have "event" in
the field named content. So I used the following as my sql query:

select *,'event' as content from events

That way each row has a "content column"  with the value "event" for all
records and the rest is taken care of by the mapping i.e.

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

Hope that helps


On 3/31/09 11:50 AM, "Wesley Small" <> wrote:

> I am trying to find a clean way to *hardcode* a field/column to a specific
> value during the DIH process.  It does seems to be possible but I am getting
> an slightly invalid constant value in my index.
> <field column="content_type_s" sourceColName="title_t" regex="(.*)"
> replaceWith="Video" />
> However, the value in the index was set to "VideoVideo" for all documents.
> Any idea why this DIH instruction would see constant value appear twice??
> Thanks,
> Wesley.

View raw message