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.
This commit is contained in:
Robert Muir 2021-02-21 11:19:41 -05:00
parent d2fb89c22f
commit 107926e486
No known key found for this signature in database
GPG Key ID: 817AE1DD322D7ECA
1 changed files with 0 additions and 1 deletions

View File

@ -3385,7 +3385,6 @@ public final class CheckIndex implements Closeable {
case SORTED:
status.totalSortedFields++;
checkDVIterator(fi, maxDoc, dvReader::getSorted);
checkBinaryDocValues(fi.name, maxDoc, dvReader.getSorted(fi), dvReader.getSorted(fi));
checkSortedDocValues(fi.name, maxDoc, dvReader.getSorted(fi), dvReader.getSorted(fi));
break;
case SORTED_NUMERIC: