lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1031686 - in /lucene/dev/trunk/lucene: CHANGES.txt src/java/org/apache/lucene/index/CheckIndex.java
Date Fri, 05 Nov 2010 18:12:09 GMT
Author: mikemccand
Date: Fri Nov  5 18:12:09 2010
New Revision: 1031686

URL: http://svn.apache.org/viewvc?rev=1031686&view=rev
Log:
LUCENE-2744: only print number of fields w/ norms on 'test: norms....' CheckIndex output

Modified:
    lucene/dev/trunk/lucene/CHANGES.txt
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/CheckIndex.java

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1031686&r1=1031685&r2=1031686&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Fri Nov  5 18:12:09 2010
@@ -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

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/CheckIndex.java?rev=1031686&r1=1031685&r2=1031686&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/CheckIndex.java Fri Nov  5 18:12:09
2010
@@ -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;
       }
 



Mime
View raw message