mirror of https://github.com/apache/lucene.git
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:
parent
d2fb89c22f
commit
107926e486
|
@ -3385,7 +3385,6 @@ public final class CheckIndex implements Closeable {
|
||||||
case SORTED:
|
case SORTED:
|
||||||
status.totalSortedFields++;
|
status.totalSortedFields++;
|
||||||
checkDVIterator(fi, maxDoc, dvReader::getSorted);
|
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));
|
checkSortedDocValues(fi.name, maxDoc, dvReader.getSorted(fi), dvReader.getSorted(fi));
|
||||||
break;
|
break;
|
||||||
case SORTED_NUMERIC:
|
case SORTED_NUMERIC:
|
||||||
|
|
Loading…
Reference in New Issue