mirror of https://github.com/apache/lucene.git
LUCENE-9416: fix CheckIndex to print an invalid non-zero norm as unsigned long when detecting corruption
This commit is contained in:
parent
2f155aa0c3
commit
327d860a00
|
@ -175,6 +175,9 @@ Improvements
|
|||
per hit in dependencies, ExpressionFunctionValues will no longer
|
||||
recompute already computed values (Haoyu Zhai)
|
||||
|
||||
* LUCENE-9416: Fix CheckIndex to print an invalid non-zero norm as
|
||||
unsigned long when detecting corruption.
|
||||
|
||||
Optimizations
|
||||
---------------------
|
||||
(No changes)
|
||||
|
|
|
@ -1671,7 +1671,7 @@ public final class CheckIndex implements Closeable {
|
|||
}
|
||||
final long norm = norms.longValue();
|
||||
if (norm != 0 && visitedDocs.get(doc) == false) {
|
||||
throw new RuntimeException("Document " + doc + " doesn't have terms according to postings but has a norm value that is not zero: " + norm);
|
||||
throw new RuntimeException("Document " + doc + " doesn't have terms according to postings but has a norm value that is not zero: " + Long.toUnsignedString(norm));
|
||||
} else if (norm == 0 && visitedDocs.get(doc)) {
|
||||
throw new RuntimeException("Document " + doc + " has terms according to postings but its norm value is 0, which may only be used on documents that have no terms");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue