LUCENE-2744: only print number of fields w/ norms on 'test: norms....' CheckIndex output

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1031686 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-11-05 18:12:09 +00:00
parent a8fd6068ed
commit e83d2c63bb
2 changed files with 7 additions and 1 deletions

View File

@ -614,6 +614,10 @@ Bug fixes
fields could lead to invalid ArrayIndexOutOfBoundsExceptions.
(Robert Muir, Mike McCandless)
* LUCENE-2744: CheckIndex was stating total number of fields,
not the number that have norms enabled, on the "test: field
norms..." output. (Mark Kristensson via Mike McCandless)
New features
* LUCENE-2128: Parallelized fetching document frequencies during weight

View File

@ -550,7 +550,9 @@ public class CheckIndex {
}
final byte[] b = new byte[reader.maxDoc()];
for (final String fieldName : fieldNames) {
reader.norms(fieldName, b, 0);
if (reader.hasNorms(fieldName)) {
reader.norms(fieldName, b, 0);
}
++status.totFields;
}