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

StatsComponent - get min, max, sum, qt, avg of number fields

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: search
    • Labels:
      None

      Description

      StatsComponent - it returns min,max,sum,qt,avg of specified number fields:

      request parameters:
      &stats=on&stats.field=price

      <stats>
       <stats_fields>
         <lst name="price">
             <double name="min">10</double>
             <double name="max">30</double>
             <double name="avg">20</double>
             <double name="sum">60</double>
             <double name="qt">3</double>
         </lst>
       </stats_fields>
      </stats>
      

      WRT "stats", the component can output sum and avg, but not sd and var.

      USE CASE:
      StatsComponent can be used to get "market price" of DocSet e.g. rental housing site, package tour site.

        Attachments

        1. SOLR-680.patch
          12 kB
          Koji Sekiguchi
        2. SOLR-680.patch
          16 kB
          Ryan McKinley
        3. SOLR-680.patch
          22 kB
          Ryan McKinley
        4. SOLR-680.patch
          26 kB
          Ryan McKinley
        5. SOLR-680.patch
          28 kB
          Ryan McKinley
        6. SOLR-680.patch
          34 kB
          Ryan McKinley
        7. SOLR-680-remove-bad-median-calculation.patch
          6 kB
          Ryan McKinley
        8. SOLR-680.patch
          15 kB
          Harish Agarwal

          Issue Links

            Activity

              People

              • Assignee:
                ryantxu Ryan McKinley
                Reporter:
                koji Koji Sekiguchi
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: