Solr
  1. Solr
  2. SOLR-7800

avg() facet function counts missing values

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3
    • Component/s: Facet Module
    • Labels:
      None

      Description

      The avg() facet function currently counts missing values as 0 (so the average of [3,3,missing] is currently 2 instead of 3.

      We should change it so that missing values are entirely skipped.
      If 0 values are desired for missing values, that can be expressed using the "def" function query: avg(def(myfield,0))

      1. SOLR-7800.patch
        2 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment -

        Simple patch.

        Show
        Yonik Seeley added a comment - Simple patch.
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-7800: avg facet function should skip missing values

        Show
        ASF subversion and git services added a comment - Commit 1691430 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1691430 ] SOLR-7800 : avg facet function should skip missing values
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-7800: avg facet function should skip missing values

        Show
        ASF subversion and git services added a comment - Commit 1691431 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1691431 ] SOLR-7800 : avg facet function should skip missing values
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development