[
https://issues.apache.org/jira/browse/LUCENE-5533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937770#comment-13937770
]
Rob Audenaerde commented on LUCENE-5533:
----------------------------------------
I hit this pretty easily. I tried to build an aggregator that sums the
associated values for a given search. In my testcase, I used 1M documents. The
n-th document had {{n}} as associated int value. Average int value is thus
500.000. 500.000x1M > 2,147,483,648
I currently switched to using Floats, which for me gives results that are
accurate enough, and also allow for numbers greater than {{Integer.MAX_VALUE}},
so I'm not really sure it is a problem. Maybe there should be a
{{RuntimeException}} if the accumulated values overflows?
> TaxonomyFacetSumIntAssociations overflows, unpredicted results
> --------------------------------------------------------------
>
> Key: LUCENE-5533
> URL: https://issues.apache.org/jira/browse/LUCENE-5533
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/facet
> Affects Versions: 4.7
> Reporter: Rob Audenaerde
>
> {{TaxonomyFacetSumIntAssociations}} extends {{IntTaxonomyFacets}} which uses
> a {{int[]}} to store values. If you sum a lot of integers in the
> IntAssociatoins, the {{int}} will overflow.
> The easiest fix seems to change the {{value[]}} to {{long}}?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]