将数据导入solr时拆分多值字段
当涉及到多个值时,我在理解 solr 3.4 时遇到了一些麻烦。我有这个 DIH:
<dataConfig>
<dataSource type="JdbcDataSource" name="********" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/lokal" user="****" password="******" />
<document>
<entity name="Search" transformer="RegexTransformer" query="select b_id, b_navn, b_cats, b_info, b_keyword, b_critical, b_geo, b_adress from searchbiz">
<field column="b_id" name="b_id" />
<field column="b_info" name="b_info" />
<field column="b_cats" name="b_cats" splitBy=","/>
</entity>
</document>
</dataConfig>
现在,我的问题是当这个 b_cats 被索引时我得到这个结果:
<arr name="b_adress">
<str>place1, place2</str>
</arr>
但我认为它应该是每个节点上的一个节点。
当我尝试使用此字段进行分面时,我得到“place1,place2”= xx 结果,而不是 place1 = xx 和 place2 xx。
有人能指出我在这个问题上的正确方向吗?
谢谢 ;)
I'm having a bit of trouble getting my head around solr 3.4 when it comes to multiple values. I have this DIH:
<dataConfig>
<dataSource type="JdbcDataSource" name="********" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/lokal" user="****" password="******" />
<document>
<entity name="Search" transformer="RegexTransformer" query="select b_id, b_navn, b_cats, b_info, b_keyword, b_critical, b_geo, b_adress from searchbiz">
<field column="b_id" name="b_id" />
<field column="b_info" name="b_info" />
<field column="b_cats" name="b_cats" splitBy=","/>
</entity>
</document>
</dataConfig>
Now, my problem is when this b_cats is index'ed Im getting this result :
<arr name="b_adress">
<str>place1, place2</str>
</arr>
But I thought it should be one node on each.
When I try to facet using this field, I'm getting "place1, place2" = xx result, instead of place1 = xx, and place2 xx.
Can anybody please point me in the right direction on this problem?
Thanks ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是解决方案:
Here is the solution: