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

Hoss Man updated SOLR-6037:
---------------------------

    Attachment: SOLR-6037.patch

Ugh... 

Brett: thanks for reporting this.  

I've updated your patch to account for the fact that min/max might be null 
coming back from a shard.  When updating the existing distributed stats test to 
also include date fields to trigger this problem, I uncovered another glitch in 
how the sum/stddev are computed (sum was inited to "-1" for some bizare reason) 
which is also fixed in this updated patch.

> 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
>            Reporter: Brett Lucey
>            Priority: Minor
>         Attachments: SOLR-6037.patch, SOLR-6037.patch
>
>
> 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:
> {code:title=StatsValuesFactory.java|borderStyle=solid}
>   @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;
>     }
>   }
> {code}
> Attached is a one-line patch which fixes this issue.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to