Solr
  1. Solr
  2. SOLR-7387

Unable to use any function other than sum as sorting parameter for newly added solr facet aggregation functions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 5.2, 6.0
    • Component/s: faceting
    • Labels:
      None

      Description

      The error thrown is
      "error":{
      "msg":"org.apache.solr.search.facet.AvgAgg$1 cannot be cast to org.apache.solr.search.facet.FacetSortableMerger",

      and input json request is
      responseHeader":{
      "status":500,
      "QTime":24,
      "params":{
      "q":":",
      "json.facet":"{ categories:{ terms:{ field :something, limit :something, sort :

      { y : desc}

      , facet:

      {\t y : \"avg(sub(amount,count))\" }

      } } }",
      "fq":"some thing else",
      "rows":"0"}},

      1. SOLR-7387.patch
        16 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment -

        Thanks for the report, I just reproduced this.

        Show
        Yonik Seeley added a comment - Thanks for the report, I just reproduced this.
        Hide
        Yonik Seeley added a comment - - edited

        Here's a patch that fixes min,max,avg, and unique for distributed search.

        Show
        Yonik Seeley added a comment - - edited Here's a patch that fixes min,max,avg, and unique for distributed search.
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-7387: fix distrib terms facet sorting buckets by min,max,avg,unique

        Show
        ASF subversion and git services added a comment - Commit 1675707 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1675707 ] SOLR-7387 : fix distrib terms facet sorting buckets by min,max,avg,unique
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-7387: fix distrib terms facet sorting buckets by min,max,avg,unique

        Show
        ASF subversion and git services added a comment - Commit 1675708 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1675708 ] SOLR-7387 : fix distrib terms facet sorting buckets by min,max,avg,unique
        Hide
        Yonik Seeley added a comment -

        OK, sorting by any of the metrics should now work in distributed mode.

        Show
        Yonik Seeley added a comment - OK, sorting by any of the metrics should now work in distributed mode.
        Hide
        Anshum Gupta added a comment -

        Bulk close for 5.2.0.

        Show
        Anshum Gupta added a comment - Bulk close for 5.2.0.

          People

          • Assignee:
            Yonik Seeley
            Reporter:
            Vamsi Krishna D
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development