Solr multiValued字段。返回错误的值[B @ 6ad21538

时间:2012-10-25 15:57:00

标签: solr

当solr在字段中输入一些意外值时,我遇到了问题。

schema.xml中的

<field name="country_ids" type="string" multiValued="true" stored="true" indexed="true" />
media-jdbc.xml中的

<field column="country_ids" splitBy="\|" />

并且查询返回此字段的 NULL 2 | 3 | 8 | 9 | 3 。 (所有查询都很大并且完美运行)

当我在浏览器中查询时。

该字段具有奇怪的价值:

<arr name="country_ids">
    <str>[B@6ad21538</str>
</arr>

我缺少什么?

Solr版本3.5

1 个答案:

答案 0 :(得分:0)

确定!所以我使用这个查询导入:

(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)

但钢铁无法解释原因。如果有人给我解释,我将不胜感激。