lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5533) TaxonomyFacetSumIntAssociations overflows, unpredicted results
Date Mon, 17 Mar 2014 13:26:43 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-5533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937785#comment-13937785
] 

Shai Erera commented on LUCENE-5533:
------------------------------------

I see, it is a pretty extreme case indeed! We never hit overflow problems in the past :).

The problem w/ raising RuntimeException is it means adding an {{if}} to every aggregation,
which is costly and for a really extreme case. I think it's better if you write your own TaxoFacetSumLongAssoc
to use a long[], packed-ints, float[] or whatever and raise these exceptions yourself? Also,
perhaps it's ok to e.g. stop at weight=1B/2.1B to denote that this category is already very
important and all categories beyond this weight are equally important? Not sure of your usecase
and if it makes sense, but juts a thought. That too can easily be done in your own Facets
impl.

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message