Skip to content

Commit 107926e

Browse files
committed
LUCENE-9795: fix CheckIndex not to validate SortedDocValues as if they were BinaryDocValues
CheckIndex already validates SortedDocValues properly: reads every document's ordinal and validates derefing all the ordinals back to bytes from the terms dictionary. It should not do an additional (very slow) pass where it treats the field as if it were binary (doc -> ord -> byte[]), this is slow and doesn't validate any additional index data. Now that the term dictionary of SortedDocValues may be compressed, it is especially slow to misuse the docvalues field in this way.
1 parent d2fb89c commit 107926e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lucene/core/src/java/org/apache/lucene/index/CheckIndex.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3385,7 +3385,6 @@ private static void checkDocValues(
33853385
case SORTED:
33863386
status.totalSortedFields++;
33873387
checkDVIterator(fi, maxDoc, dvReader::getSorted);
3388-
checkBinaryDocValues(fi.name, maxDoc, dvReader.getSorted(fi), dvReader.getSorted(fi));
33893388
checkSortedDocValues(fi.name, maxDoc, dvReader.getSorted(fi), dvReader.getSorted(fi));
33903389
break;
33913390
case SORTED_NUMERIC:

0 commit comments

Comments
 (0)