Re: having trouble storing large text blob fields - returns binary address in search results
=subbedFlag/ entity name=partImages query=SELECT pi.prt_img_url, pi.orb_itm_id || ',' || pi.prd_gro_id || ',' || pi.spp_id as pk FROM prtxtpi_prt_img pi processor=CachedSqlEntityProcessor cacheKey=pk cacheLookup=core1-parts.id field column=prt_img_url name=partImageURL/ /entity /entity entity transformer=TemplateTransformer name=core1-model query=select prtxtms_mdl_summ.prd_typ_id, prtxtms_mdl_summ.bnd_id, prtxtms_mdl_summ.mdl_nm, prtxtms_mdl_summ.mdl_desc, 0 as rnk_no, 2 as item_type, prtxtms_mdl_summ.bnd_desc as brand, prtxtms_mdl_summ.prd_desc as div_product_type_ds, prtxtms_mdl_summ.pg_cnt, case when prtxtms_mdl_summ.part_cnt is null then 0 else prtxtms_mdl_summ.part_cnt end as part_cnt from prtxtms_mdl_summ field column =id name=id template=${core1-model.prd_typ_id},${core1-model.bnd_id},${core1-model.mdl_nm}/ field column=mdl_nm name=itemModelNo/ field column=prd_typ_id name=divProductTypeId/ field column=mdl_desc name=itemModelDesc/ field column=bnd_id name=plsBrandId/ field column=rnk_no name=rankNo/ field column=item_type name=itemType/ field column=brand name=plsBrandDesc/ field column=div_product_type_ds name=divProductTypeDesc/ field column=part_cnt name=partCnt/ field column=pg_cnt name=pageCnt/ /entity /document mark -- View this message in context: http://lucene.472066.n3.nabble.com/having-trouble-storing-large-text-blob-fields-returns-binary-address-in-search-results-tp4063979p4064407.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: having trouble storing large text blob fields - returns binary address in search results
On 17 May 2013 00:02, geeky2 gee...@hotmail.com wrote: [...] i have tried setting them up as clob fields - but this is not working (see details below) i have also tried treating them as plain string fields (removing the references to clob in the DIH) - but this does not work either. DIH configuration: entity transformer=TemplateTransformer,ClobTransformer name=core1-parts query=select summ.*, 1 as item_type, 1 as part_cnt, '' as brand, ... field column=attr_val name=attributes clob=true / field column=rsr_valname=restrictions clob=true / [...] This should work, provided that the SELECT statement is getting the correct columns from the database. Are you sure that the entity is enclosing the field in question? Could you share the entire DIH data configuration file? You should also try setting sourceColName for the ClobTransformer field. Have never tried ClobTransformer where the field name differs from the database column name. Please see: http://wiki.apache.org/solr/DataImportHandler#ClobTransformer I am not familiar with Informix, and the final possibility is that there is some bug with ClobTransformer in translating blobs from Informix. It should be possible to cajole the database to convert a blob into a VARCHAR, e.g., something like SELECT SUBSTR( attr_val, 0 ) Not sure if the syntax is database dependent. Regards, Gora
Re: having trouble storing large text blob fields - returns binary address in search results
Hello Gora, thank you for the reply - i did finally get this to work. i had to cast the column in the DIH to a clob - like this. cast(att.attr_val AS clob) as attr_val, cast(rsr.rsr_val AS clob) as rsr_val, once this was done, the ClobTransformer worked. to my knowledge - this particular use case and the need for the cast is not documented anywhere. i checked the solr wiki and searched the threads on this forum for things like clobtransformer, informix and blob without luck. i also did quite a few google searches as well but no luck (but maybe i missed something ;) maybe this is just some edge case. i also realize that informix is not that common. i have a question in to the solr developers list - just so i can better understand what actually is happening, why it was necessary for the cast, and the limitations / parameters of the ClobTransformer. the thread on the developers list is located here: http://lucene.472066.n3.nabble.com/have-developer-question-about-ClobTransformer-and-DIH-td4064256.html thx mark -- View this message in context: http://lucene.472066.n3.nabble.com/having-trouble-storing-large-text-blob-fields-returns-binary-address-in-search-results-tp4063979p4064286.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: having trouble storing large text blob fields - returns binary address in search results
On 18 May 2013 02:24, geeky2 gee...@hotmail.com wrote: Hello Gora, thank you for the reply - i did finally get this to work. i had to cast the column in the DIH to a clob - like this. cast(att.attr_val AS clob) as attr_val, cast(rsr.rsr_val AS clob) as rsr_val, once this was done, the ClobTransformer worked. [...] This would seem to indicate that the column was not a blob to start with. Did you try to index directly without the ClobTransformer? Regards, Gora
having trouble storing large text blob fields - returns binary address in search results
hello environment: solr 3.5 can someone help me with the correct configuration for some large text blob fields? we have two fields in informix tables that are of type text. when we do a search the results for these fields come back looking like this: str name=attributes[B@17c232ee/str i have tried setting them up as clob fields - but this is not working (see details below) i have also tried treating them as plain string fields (removing the references to clob in the DIH) - but this does not work either. DIH configuration: entity transformer=quot;TemplateTransformer,ClobTransformerquot; name=quot;core1-partsquot; query=quot;select summ.*, 1 as item_type, 1 as part_cnt, '' as brand, ... lt;field column=quot;attr_valquot; name=quot;attributesquot; clob=quot;truequot; / field column=rsr_valname=restrictions clob=true / Schema.xml field name=attributes type=string indexed=false stored=true/ field name=restrictions type=string indexed=false stored=true/ thx mark -- View this message in context: http://lucene.472066.n3.nabble.com/having-trouble-storing-large-text-blob-fields-returns-binary-address-in-search-results-tp4063979.html Sent from the Solr - User mailing list archive at Nabble.com.