Forgive me but I'm slightly retarded... I grew up
underneath some power lines
;)
I've read through that wiki but I still can't find what I'm
looking for. I
just want to give one of the DIH entities/fields a static
value (ie it
doesnt come from a database column). How can I configure
this?
FYI this is data-config.xml not schema.xml.
<document>
<entity name="item" query="select * from
items">
<field name="my_field"
column="static_value_not_from_db"/>
....
</entity>
</document>
I didn't do it by-myself but i think it can be done with TemplateTransformer[1] with something like:
<field column="my_field" template="static_value_not_from_db" />
Alternatively you can define default value of a field in schema.xml:
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
[1] http://wiki.apache.org/solr/DataImportHandler#TemplateTransformer