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

JSON FacetModule needs equivilents for StatsComponent's "count" and "missing" features

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • 8.4
    • Facet Module
    • None

    Description

      StatsComponent supports stats named "count" and "missing":

      • count: for the set of documents we're computing stats over, "how many non-distinct values exist in those documents in the specified field?" (or in the case of an arbitrary function: "in how many of these documents does true==ValueSource.exist()" ?)
        • no to be confused with the number of unique values (aprox "cardinality" or exact "countDistinct")
      • missing: for the set of documents we're computing stats over, "how many of those documents do not have any value in the specified field?" (or in the case of an arbitrary function: "in how many of thse documents does false==ValueSource.exist()" ?)

      (NOTE: for a single valued field, these are essentially inveses of each other, but for multivalued fields "count" actaully returns the total number of "value instances" not just the number of docs that have at least one value)

      AFAICT there is no equivalent functionality supported by the JSON FacetModule, which will be a blocker preventing some users from migrating from using stats.field (or facet.pivot+stats.field) to json.facet.

      Attachments

        There are no Sub-Tasks for this issue.

        Activity

          People

            Unassigned Unassigned
            hossman Chris M. Hostetter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: