You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/09/26 21:45:17 UTC

[GitHub] [lucene] gsmiller commented on a diff in pull request #11768: Fix tie-break bug in various Facets implementations

gsmiller commented on code in PR #11768:
URL: https://github.com/apache/lucene/pull/11768#discussion_r980530138


##########
lucene/facet/src/java/org/apache/lucene/facet/taxonomy/FloatTaxonomyFacets.java:
##########
@@ -189,10 +190,11 @@ private TopChildrenForPath getTopChildrenForPath(DimConfig dimConfig, int pathOr
 
     TopOrdAndFloatQueue.OrdAndValue reuse = null;
     while (ord != TaxonomyReader.INVALID_ORDINAL) {
-      if (values[ord] > 0) {
+      float value = values[ord];
+      if (value > 0) {
         aggregatedValue = aggregationFunction.aggregate(aggregatedValue, values[ord]);

Review Comment:
   Thanks for the catch. I intended to do this everyone but looks like I missed a spot. I'll go back through and re-check.



-- 
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