You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Brett Lucey (JIRA)" <ji...@apache.org> on 2014/05/01 16:40:17 UTC

[jira] [Updated] (SOLR-6037) Stats Component Reports Incorrect Max in Distributed Data

     [ https://issues.apache.org/jira/browse/SOLR-6037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Lucey updated SOLR-6037:
------------------------------

    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 (in StatsValueFactory.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.

> Stats Component Reports Incorrect Max in Distributed Data
> ---------------------------------------------------------
>
>                 Key: SOLR-6037
>                 URL: https://issues.apache.org/jira/browse/SOLR-6037
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 5.0
>            Reporter: Brett Lucey
>            Priority: Minor
>
> 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 (in StatsValueFactory.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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org