zoukankan      html  css  js  c++  java
  • what's the difference between grouping and facet in lucene 3.5

     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?


    They are two different lucene features:

    • 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.

     Facet只管返回数量,Grouping还需要返回每组的数据。

  • 相关阅读:
    JavaScript之Math和date
    JavaScript之ES5和String
    JavaScript之数组
    JavaScript之 函数
    JavaScript之循环语句
    movies.js
    Js内存存放机制
    Web框架
    css中那些属性是可以继承的?
    赋值运算
  • 原文地址:https://www.cnblogs.com/huangfox/p/3159014.html
Copyright © 2011-2022 走看看