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-unsubscr...@lucene.apache.org

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


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

Reply via email to