分层分面
有人有以这种方式实现分层分面的经验吗?查看链接 http://lucene.472066.n3.nabble.com /multi-level-faceting-td1629650.html#a1672083
架构应该是什么样子?
(我想在不使用 SOLR-64 的情况下实现树分面。该补丁在较旧的分支上运行良好,唯一的问题是它不会修补 solr 主干。)
Has anybody have experience implementing hierarchical faceting in this fashion? See link
http://lucene.472066.n3.nabble.com/multi-level-faceting-td1629650.html#a1672083
What should the schema look like?
(I would like to implement tree faceting without use of SOLR-64. The patch works well on older branch, the only thing is that it doesn't patch solr trunk.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对邮件列表帖子中描述的特定解决方案没有经验,但在我上次研究他的领域时,我偶然发现了 Solr Bobo Browse 集成。它还支持分层分面,看起来相当成熟。
如果您想坚持使用纯 Solr 解决方案,您可以为您想要关注的每个方面添加一个多值字段到文档中。邮件列表中的示例假定您只有一个名为
category
的字段。在您的架构 XML 中,您将添加:
当您索引文档时,您将索引该文档所属的层次结构的所有级别,并将层次结构级别作为前缀:
索引后查询和遍历层次结构在邮件列表。
I don't have experience with the particular solution described in the mailing list post but during my last research into his area I stumbled upon the the Solr Bobo Browse integration. It also supports hierarchical faceting and seems quite mature.
If you want to stick with the pure Solr solution you would add a single multivalued field to the document for every aspect that you want to facet on. The example in the mailing list assumes that you have just one field called
category
.In your schema XML you would add:
When you index you documents you would then index all levels of your hierarchy that the document belongs to with the hierarchy level as a prefix:
Querying and traversing the hierarchy once it is indexed is quite well explained in the mailing list.