lucene 3.5中分组和分面有什么区别 [英] what's the difference between grouping and facet in lucene 3.5

查看:23
本文介绍了lucene 3.5中分组和分面有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 lucene 3.5 contrib 文件夹中找到了两个插件:一个是分组,另一个是 facet.在我的选择中,它们都用于将我的文档分成不同的类别.为什么 lucene 现在有两个插件呢?

I found in lucene 3.5 contrib folder two plugins: one is grouping, the other is facet. In my option, both of them were used to split my documents into different categories. Why lucene has now two plugins for this?

推荐答案

它们是两个不同的 lucene 特性:

They are two different lucene features:

  • Grouping 首次发布于 Lucene 3.2,其相关的 jira 问题是 LUCENE-1421:允许按指定字段对搜索结果进行分组.例如,如果您按作者字段分组,则作者字段中具有相同值的所有文档都属于一个组.您将有一种树作为输出.如果您想更深入地使用此 lucene 功能,这篇博文应该很有用.
  • Faceting 最初是在 Lucene 3.4 中发布的,其相关的 jira 问题是 LUCENE-3079:此功能不会对文档进行分组,它只是告诉您有多少文档属于某个方面的特定值.例如,如果您有基于作者字段的构面,您将收到所有作者的列表,并且对于每个作者,您将知道有多少文档属于该特定作者.之后,如果您想查看这些文档,则必须再查询一次添加特定的过滤器(作者=whatever).分面搜索实际上是基于浏览文档,应用多个过滤器逐步找到您正在搜索的文档真的很感兴趣.
  • Grouping was first released with Lucene 3.2, its related jira issue is LUCENE-1421: it allows to group search results by specified field. For example, if you group by the author field, then all documents with the same value in the author field fall into a single group. You will have a kind of tree as output. If you want to go deeper into using this lucene feature, this blog post should be useful.
  • Faceting was first released with Lucene 3.4, its related jira issue is LUCENE-3079: this feature doesn't group documents, it just tells you how many documents fall in a specific value of a facet. For example, if you have a facet based on the author field, you will receive a list of all your authors, and for each author you will know how many documents belong to that specific author. After, if you want to see those documents, you have to query one more time adding a specific filter (author=whatever). The faceted search is in fact based on browsing documents applying multiple filters to progressively reach the documents you're really interested in.

这篇关于lucene 3.5中分组和分面有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆