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

StatsComponent, calcdistinct, ability to disable distinctValues while keeping countDistinct

    Details

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

      Description

      When using calcdistinct with large amounts of data the distinctValues field can be extremely large. In cases where the countDistinct is only required it would be helpful if the server did not return distinctValues in the response.

      I'm no expert, but here are some ideas for how the syntax could look.

      # Both countDistinct and distinctValues are returned, along with all other stats
      stats.calcdistinct=true&stats.field=myfield
      
      # Only countDistinct and distinctValues are returned
      stats.calcdistinct=true&stats.field={!countDistinct=true distinctValues=true}myfield
      
      # Only countDistinct is returned
      stats.calcdistinct=true&stats.field={!countDistinct=true}myfield
      
      # Only distinctValues is returned
      stats.calcdistinct=true&stats.field={!distinctValues=true}myfield
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hossman Hoss Man
                Reporter:
                JamesA James Andres
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: