You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "stefanvodita (via GitHub)" <gi...@apache.org> on 2023/11/21 23:59:48 UTC

Re: [I] Is it correct for facets to assume positive aggregation values? [lucene]

stefanvodita commented on issue #12585:
URL: https://github.com/apache/lucene/issues/12585#issuecomment-1821880175

   I thought some more about this issue and it really seems like a bug that I can have a non-positive aggregation value, but I can't return it in top children.
   If we were to address it, I can think of three approaches:
   1. Choose a magic value that communicates to us that an ordinal was not encountered. This magic value is 0 right now. Maybe `Integer.MIN_VALUE` and `Float.MAX_VALUE` might be better choices, allowing for more valid aggregation values.
   2. Store a boolean for each ordinal. This would produce correct results, but cost more memory.
   3. Use a map to store the arrays. `IntTaxonomyFacets` already does this in some cases and I [think](https://github.com/apache/lucene/issues/12576#issuecomment-1783545880) this might be appropriate in enough cases that we can always use a map.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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