You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2022/07/29 19:39:09 UTC
[lucene] branch branch_9x updated: LUCENE-10633: Fix handling of missing values in reverse sorts.
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 6366cf2e7ad LUCENE-10633: Fix handling of missing values in reverse sorts.
6366cf2e7ad is described below
commit 6366cf2e7ad37dd4f14bb5b7facd3477124073fc
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Fri Jul 29 21:35:51 2022 +0200
LUCENE-10633: Fix handling of missing values in reverse sorts.
---
.../org/apache/lucene/search/comparators/TermOrdValComparator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lucene/core/src/java/org/apache/lucene/search/comparators/TermOrdValComparator.java b/lucene/core/src/java/org/apache/lucene/search/comparators/TermOrdValComparator.java
index 36e64f6df89..cff3f846162 100644
--- a/lucene/core/src/java/org/apache/lucene/search/comparators/TermOrdValComparator.java
+++ b/lucene/core/src/java/org/apache/lucene/search/comparators/TermOrdValComparator.java
@@ -403,7 +403,7 @@ public class TermOrdValComparator extends FieldComparator<BytesRef> {
minOrd = -1;
}
- if (bottomOrd == Integer.MAX_VALUE) {
+ if (bottomOrd == missingOrd) {
// The queue still contains missing values.
if (singleSort) {
// If there is no tie breaker, we can start ignoring missing values from now on.
@@ -421,7 +421,7 @@ public class TermOrdValComparator extends FieldComparator<BytesRef> {
} else {
- if (bottomOrd == -1) {
+ if (bottomOrd == missingOrd) {
// The queue still contains missing values.
if (singleSort) {
// If there is no tie breaker, we can start ignoring missing values from now on.