You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by be...@apache.org on 2025/09/12 21:03:59 UTC

(lucene) branch branch_10x updated: fix off by one (#15183)

This is an automated email from the ASF dual-hosted git repository.

benwtrent pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_10x by this push:
     new f063435c76f fix off by one (#15183)
f063435c76f is described below

commit f063435c76fd3e0b7fbd187b70349e1c70c3c2de
Author: Trevor McCulloch <tr...@mongodb.com>
AuthorDate: Fri Sep 12 13:13:13 2025 -0700

    fix off by one (#15183)
---
 .../internal/vectorization/Lucene99MemorySegmentFloatVectorScorer.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/core/src/java21/org/apache/lucene/internal/vectorization/Lucene99MemorySegmentFloatVectorScorer.java b/lucene/core/src/java21/org/apache/lucene/internal/vectorization/Lucene99MemorySegmentFloatVectorScorer.java
index b24a1a5f859..42a94b82c28 100644
--- a/lucene/core/src/java21/org/apache/lucene/internal/vectorization/Lucene99MemorySegmentFloatVectorScorer.java
+++ b/lucene/core/src/java21/org/apache/lucene/internal/vectorization/Lucene99MemorySegmentFloatVectorScorer.java
@@ -115,7 +115,7 @@ abstract sealed class Lucene99MemorySegmentFloatVectorScorer
       }
       if (remaining > 2) {
         scores[i + 2] = normalizeRawScore(scratchScores[2]);
-        maxScore = Math.max(maxScore, scores[i + 1]);
+        maxScore = Math.max(maxScore, scores[i + 2]);
       }
     }
     return maxScore;