lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "DataImportHandlerFaq" by ShalinMangar
Date Mon, 07 Sep 2009 08:50:25 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by ShalinMangar:

The comment on the change is:
Added note on using blob values

        user="" password=""/>
+ === Blob values in my table are added to the Solr document as object strings like B@1f23c5
+ The problem occurs because blobs are read as a byte array which does not have a useful toString
method. The workaround is to:
+  1. Use convertType="true" on the !JdbcDataSource
+  1. Write a Transformer which converts the byte[] into a string type
+  1. You can also use a "cast" sql function which can convert the data type from blob to
strings if your database provides such a function
+ Note that "convertType" attribute uses the target schema field's type name to convert the
value returned by the result set. Therefore, any transformers being used on the entity should
be aware of the type information.

View raw message