I think what it comes down to is that a Clob "is-not-a" Blob.  So any code 
dealing with Clobs that also wants to deal with Blobs and do the same thing 
with them is going to need to first check the object type returned from the 
jdbc driver then do separate logic depending on the object type returned.  
Specifically, if a java.sql.Clob, it needs to call "getCharacterStream", but if 
a java.sql.Blob, "getBinaryStream".  Possibly there are other gotchas about 
making assumptions about the binary stream?  Then again, if a user uses 
"ClobTransformer" on a "Blob", then perhaps you can assume all you want about 
what the binary stream is going to be?

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: geeky2 [mailto:gee...@hotmail.com] 
Sent: Friday, May 17, 2013 4:44 PM
To: dev@lucene.apache.org
Subject: RE: have developer question about ClobTransformer and DIH

Hello James,

>>
I think the usual practice is to use BLOB types to store data that is not a
character stream.  So you case is probably pretty rare
<<

admittedly - if the fields had been left as clob fields, then all would have
been well.  the change to informix Text blobs was driven by the need to use
the informix dbload utility, to push data in to the target table before
using the DIH to pull data from the target table in to the core.

>>
If casting solves the issue, then why not? 
<<

ok - i will concede this point - but i am interested in "why"
ClobTransformer _needs_ the cast to work in the first place.  

>>
Then again if CLOBTransformer was changed to handle BLOBs also, I do not see
the harm
<<

if possible - i would like to understand more about ClobTransformer and what
would be needed to make that change.

>>
But I would think it would be a much more common case that users would be
putting binary-format documents in BLOBs then feeding them to tika or
something to extract the text. 
<<

i am not sure - maybe.  at SHC (Sears) the data being stored in these two
columns is a large JSON blob.  when a query is performed, the JSON blob is
parsed and used as needed.

thanks again for the discussion and education.


mark








--
View this message in context: 
http://lucene.472066.n3.nabble.com/have-developer-question-about-ClobTransformer-and-DIH-tp4064256p4064289.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to