You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/01/22 00:03:40 UTC

svn commit: r1436681 - in /lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene: index/CheckIndex.java index/MultiDocValues.java index/SortedDocValues.java search/FieldComparator.java util/fst/Util.java

Author: rmuir
Date: Mon Jan 21 23:03:40 2013
New Revision: 1436681

URL: http://svn.apache.org/viewvc?rev=1436681&view=rev
Log:
nuke more nocommits

Modified:
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/util/fst/Util.java

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java?rev=1436681&r1=1436680&r2=1436681&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java Mon Jan 21 23:03:40 2013
@@ -676,7 +676,7 @@ public class CheckIndex {
       }
       for (FieldInfo info : reader.getFieldInfos()) {
         if (info.hasNorms()) {
-          checkSimpleNorms(info, reader, infoStream);
+          checkNorms(info, reader, infoStream);
           ++status.totFields;
         } else {
           if (reader.getNormValues(info.name) != null) {
@@ -1262,7 +1262,7 @@ public class CheckIndex {
       for (FieldInfo fieldInfo : reader.getFieldInfos()) {
         if (fieldInfo.hasDocValues()) {
           status.totalValueFields++;
-          checkSimpleDocValues(fieldInfo, reader, infoStream);
+          checkDocValues(fieldInfo, reader, infoStream);
         } else {
           if (reader.getBinaryDocValues(fieldInfo.name) != null ||
               reader.getNumericDocValues(fieldInfo.name) != null ||
@@ -1284,10 +1284,6 @@ public class CheckIndex {
   }
   
   private static void checkBinaryDocValues(String fieldName, AtomicReader reader, BinaryDocValues dv) {
-    // nocommit remove this:
-    if (dv == null) {
-      return;
-    }
     // nocommit what else to check ...
     BytesRef scratch = new BytesRef();
     for (int i = 0; i < reader.maxDoc(); i++) {
@@ -1296,10 +1292,6 @@ public class CheckIndex {
   }
   
   private static void checkSortedDocValues(String fieldName, AtomicReader reader, SortedDocValues dv) {
-    // nocommit remove this:
-    if (dv == null) {
-      return;
-    }
     checkBinaryDocValues(fieldName, reader, dv);
     final int maxOrd = dv.getValueCount()-1;
     FixedBitSet seenOrds = new FixedBitSet(dv.getValueCount());
@@ -1332,23 +1324,13 @@ public class CheckIndex {
   }
   
   private static void checkNumericDocValues(String fieldName, AtomicReader reader, NumericDocValues ndv) {
-    // nocommit remove this:
-    if (ndv == null) {
-      return;
-    }
     // nocommit what else to check!
     for (int i = 0; i < reader.maxDoc(); i++) {
       ndv.get(i);
     }
   }
   
-  // nocommit
-  public static void checkSimpleDocValues(FieldInfo fi, AtomicReader reader, PrintStream infoStream) throws Exception {
-    // nocommit: just for debugging
-    Map<String,String> atts = fi.attributes();
-    if (atts != null) {
-      msg(infoStream, "  field: " + fi.name + ": " + atts);
-    }
+  private static void checkDocValues(FieldInfo fi, AtomicReader reader, PrintStream infoStream) throws Exception {
     switch(fi.getDocValuesType()) {
       case SORTED:
         checkSortedDocValues(fi.name, reader, reader.getSortedDocValues(fi.name));
@@ -1364,8 +1346,7 @@ public class CheckIndex {
     }
   }
   
-  // nocommit
-  public static void checkSimpleNorms(FieldInfo fi, AtomicReader reader, PrintStream infoStream) throws IOException {
+  private static void checkNorms(FieldInfo fi, AtomicReader reader, PrintStream infoStream) throws IOException {
     switch(fi.getNormType()) {
       case NUMERIC:
         checkNumericDocValues(fi.name, reader, reader.getNormValues(fi.name));

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java?rev=1436681&r1=1436680&r2=1436681&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java (original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java Mon Jan 21 23:03:40 2013
@@ -53,7 +53,7 @@ public class MultiDocValues {
       }
     }
 
-    // assert anyReal; // nocommit: unsafe until 4.0 is done
+    assert anyReal;
 
     return new NumericDocValues() {
       @Override
@@ -65,7 +65,7 @@ public class MultiDocValues {
         } catch (IOException ioe) {
           throw new RuntimeException(ioe);
         }
-        if (norms == null) { // WTF? should be EMPTY?
+        if (norms == null) {
           return 0;
         } else {
           return norms.get(docID - leaves.get(subIndex).docBase);

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java?rev=1436681&r1=1436680&r2=1436681&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java (original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java Mon Jan 21 23:03:40 2013
@@ -17,10 +17,6 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import java.io.IOException;
-import java.util.Comparator;
-
-import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 
 public abstract class SortedDocValues extends BinaryDocValues {
@@ -41,14 +37,6 @@ public abstract class SortedDocValues ex
     }
   }
 
-  // nocommit make this final, and impl seekExact(term) to
-  // fwd to lookupTerm
-
-  // nocommit should we nuke this?  the iterator can be
-  // efficiently built "on top" since ord is part of the
-  // API?  why must it be impl'd here...?
-  // SortedDocValuesTermsEnum.
-
   public static final SortedDocValues EMPTY = new SortedDocValues() {
     @Override
     public int getOrd(int docID) {

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java?rev=1436681&r1=1436680&r2=1436681&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java (original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java Mon Jan 21 23:03:40 2013
@@ -84,7 +84,6 @@ import org.apache.lucene.util.BytesRef;
  * @lucene.experimental
  */
 public abstract class FieldComparator<T> {
-  // nocommit remove the doc values comparators
 
   /**
    * Compare hit at slot1 with hit at slot2.

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/util/fst/Util.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/util/fst/Util.java?rev=1436681&r1=1436680&r2=1436681&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/util/fst/Util.java (original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/util/fst/Util.java Mon Jan 21 23:03:40 2013
@@ -113,8 +113,10 @@ public final class Util {
     return getByOutput(fst, targetOutput, in, arc, scratchArc, result);
   }
     
-  /** Expert: like {@link Util#getByOutput(FST, long)} except reusing */
-  // nocommit
+  /** 
+   * Expert: like {@link Util#getByOutput(FST, long)} except reusing 
+   * BytesReader, initial and scratch Arc, and result.
+   */
   public static IntsRef getByOutput(FST<Long> fst, long targetOutput, BytesReader in, Arc<Long> arc, Arc<Long> scratchArc, IntsRef result) throws IOException {
     long output = arc.output;
     int upto = 0;