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

Facet bucket filters

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Facet Module
    • Labels:
      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

              • Assignee:
                Unassigned
                Reporter:
                yseeley@gmail.com Yonik Seeley
              • Votes:
                9 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated: