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

Stats Component Reports Incorrect max/sum/stddev for date fields in Distributed Data

    XMLWordPrintableJSON

Details

    Description

      When computing statistics using the statistics component, the value for max may be reported incorrectly if the maximum value does not lie in the first shard.

      This is where the problem is:

      StatsValuesFactory.java
        @Override
        protected void updateMinMax(Date min, Date max) {
          if(this.min==null || this.min.after(min)) {
            this.min = min;
          }
          if(this.max==null || this.max.before(min)) {
            this.max = max;
          }
        }
      

      Attached is a one-line patch which fixes this issue.

      Attachments

        1. SOLR-6037.patch
          3 kB
          Chris M. Hostetter
        2. SOLR-6037.patch
          2 kB
          Chris M. Hostetter
        3. SOLR-6037.patch
          1 kB
          Brett Lucey

        Activity

          People

            hossman Chris M. Hostetter
            brett.lucey Brett Lucey
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: