Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1
    • Component/s: None
    • Labels:
      None

      Description

      Use Ted Dunnings t-digest to add distributed percentile support to the new Facet Module (aka "JSON Facets").

      // single percentile over complete doc set
      json.facet={ median : 'percentile(my_field,50)' }
      
      // calculate multiple percentiles of a function
      json.facet={multi:'percentile( mul(f1,f2), 1,10,50,90,99)' }
      
      // calculate the median of each facet bucket and sort by that value
      json.facet={categories:{terms:{
        field:cat ,
        sort:'median desc' ,
        facet : {
          median : 'percentile(myfield,50)' ,
          otherstat : 'sum(something_else)'
        }
      }}}
      
      1. SOLR-7306.patch
        13 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment -

        Here's a patch, it was simpler than I thought to add support.

        As a testament to the pluggability / flexibility of the new faceting module, this is something that an end user could have done with a plugin - no need to modify Solr source files.

        Show
        Yonik Seeley added a comment - Here's a patch, it was simpler than I thought to add support. As a testament to the pluggability / flexibility of the new faceting module, this is something that an end user could have done with a plugin - no need to modify Solr source files.
        Hide
        ASF subversion and git services added a comment -

        Commit 1669189 from Yonik Seeley in branch 'dev/trunk'
        [ https://svn.apache.org/r1669189 ]

        SOLR-7306: percentiles for new facet module

        Show
        ASF subversion and git services added a comment - Commit 1669189 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1669189 ] SOLR-7306 : percentiles for new facet module
        Hide
        ASF subversion and git services added a comment -

        Commit 1669190 from Yonik Seeley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1669190 ]

        SOLR-7306: percentiles for new facet module

        Show
        ASF subversion and git services added a comment - Commit 1669190 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1669190 ] SOLR-7306 : percentiles for new facet module
        Hide
        Yonik Seeley added a comment -

        Committed. Here are some more examples of use:
        http://yonik.com/percentiles-for-solr-faceting/

        Show
        Yonik Seeley added a comment - Committed. Here are some more examples of use: http://yonik.com/percentiles-for-solr-faceting/
        Hide
        Timothy Potter added a comment -

        Bulk close after 5.1 release

        Show
        Timothy Potter added a comment - Bulk close after 5.1 release

          People

          • Assignee:
            Yonik Seeley
            Reporter:
            Yonik Seeley
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development