当solr在字段中放置一些意想不到的值时,我遇到了问题。
in schema.xml
<field name="country_ids" type="string" multiValued="true" stored="true" indexed="true" />in media-jdbc.xml
<field column="country_ids" splitBy="\|" />查询返回此字段的NULL或2_~_(_(所有查询都是大的,工作得很完美)
当我在浏览器中进行查询时。
该字段具有奇怪的价值:
<arr name="country_ids">
<str>[B@6ad21538</str>
</arr>我错过了什么?
Solr版本3.5
发布于 2012-10-25 17:40:24
好的!因此,我使用这个查询导入:
(select group_concat(distinct mmpc.mediacountry_id separator '|') from media_media_production_countries mmpc where mmpc.media_id=m.id) as country_ids经过稍微修改,我得到了正确的结果。改为:
convert((select group_concat(distinct mmpc.mediacountry_id separator '|') from media_media_production_countries mmpc where mmpc.media_id=m.id) USING latin1) as country_ids如果你不介意,我加了conver(**MY_STATEMENT** USING latin1)
但钢铁无法解释原因。如果有人能给我一个解释,我会很感激的。
https://stackoverflow.com/questions/13072540
复制相似问题