You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2010/09/03 23:09:10 UTC
[Solr Wiki] Trivial Update of "DIHCustomTransformer" by FrankWesemann
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "DIHCustomTransformer" page has been changed by FrankWesemann.
The comment on this change is: Added the Tip to extend Transformer.
http://wiki.apache.org/solr/DIHCustomTransformer?action=diff&rev1=3&rev2=4
--------------------------------------------------
}
}
}}}
- No need to extend any class. Just write any class which has a method named transformRow with the above signature and DataImportHandler will instantiate it and call the transformRow method using reflection. You will specify it in your data-config.xml as follows:
+ No need to extend any class. Just write any class which has a method named transformRow with the above signature and DataImportHandler will instantiate it and call the transformRow method using reflection.
+ But of course you may extend the abstract class org.apache.solr.handler.dataimport.Transformer.
+ You will specify it in your data-config.xml as follows:
{{{
<entity name="artist" query="..." transformer="foo.TrimTransformer">
<field column="artistName" />