Im still having a problem with this... for example I would assume this would
index the value Item into the field called type
<document>
<entity name="item"
transformer="TemplateTransformer"
query="select * from items">
<field name="type" template="Item"/>
</entity>
</document>
However I receive this error when starting up Solr: Caused by:
org.apache.solr.handler.dataimport.DataImportHandlerException: Field must
have a column attribute
I must not be getting something. Did I mentioned I was booted in the head by
a horse when I was young?
Ok, even if I have the template transformer working to set static values
will this work for multi-valued fields?
Thanks yet again
Ahmet Arslan wrote:
>
>> I feel like the default option is a little hacky plus I'll
>> probably be
>> sharing my schema.xml for multiple cores using dynamic
>> field types.
>>
>> I can't believe there isnt an easy way to specify this. So
>> my only options
>> is something like this?
>
> Also you can generate this static value from your SQL sentence. Something
> like: select *, 'static_value_not_from_db' as my_field from items
>
>> What if I don't need a template transformer for all the
>> other fields? Is it
>> ok to mix and match? Will this effect performance at all?
>
> Template Transformer is activated with template="". All Transformers work
> like that. I don't think that it will noticeably effect performance.
>
>
>
>
>
--
View this message in context:
http://old.nabble.com/DIH-field-options-tp27873996p27881023.html
Sent from the Solr - User mailing list archive at Nabble.com.