mirror of https://github.com/apache/lucene.git
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:
parent
a8fd6068ed
commit
e83d2c63bb
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue