LUCENE-10633: Fix handling of missing values in reverse sorts.

This commit is contained in:
Adrien Grand 2022-07-29 21:35:51 +02:00
parent 1ad28a3136
commit 7c9d3cd6ff
1 changed files with 2 additions and 2 deletions

View File

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