分层分面

发布于 2024-10-19 08:57:15 字数 311 浏览 6 评论 0原文

有人有以这种方式实现分层分面的经验吗?查看链接 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静若繁花 2024-10-26 08:57:15

我对邮件列表帖子中描述的特定解决方案没有经验,但在我上次研究他的领域时,我偶然发现了 Solr Bobo Browse 集成。它还支持分层分面,看起来相当成熟。

如果您想坚持使用纯 Solr 解决方案,您可以为您想要关注的每个方面添加一个多值字段到文档中。邮件列表中的示例假定您只有一个名为 category 的字段。

在您的架构 XML 中,您将添加:

<field name="category" type="string" 
                               indexed="true" stored="true" multiValued="true" />

当您索引文档时,您将索引该文档所属的层次结构的所有级别,并将层次结构级别作为前缀:

<category>1_sport</category>
<category>2_watersport</category>
<category>3_scuba_diving</category>

索引后查询和遍历层次结构在邮件列表。

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:

<field name="category" type="string" 
                               indexed="true" stored="true" multiValued="true" />

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:

<category>1_sport</category>
<category>2_watersport</category>
<category>3_scuba_diving</category>

Querying and traversing the hierarchy once it is indexed is quite well explained in the mailing list.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文