Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9603

Facet bucket filters

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Facet Module
    • None

    Description

      "filter" may be a bit of an overloaded term, but it would be nice to be able to filter facet buckets by additional things, like the metrics that are calculated per bucket.

      This is like the HAVING clause in SQL.

      Example of a facet that would group by author, find the average review rating for that author, and filter out authors (buckets) with less than a 3.5 average.

      reviews : {
        type : terms,
        field: author,
        sort: "x desc",
        having: "x >= 3.5",
        facet : {
          x : avg(rating)
        }
      }
      

      This functionality would also be useful for "pushing down" more calculations to the endpoints for streaming expressions / SQL.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yseeley@gmail.com Yonik Seeley
              Votes:
              7 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: