Apache Lucene open-source search software
nuke more nocommits
Robert Muir36ebc7112490
diff --git a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.javaindex 44cc6d704bd..11e4f33b18a 100644--- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java+++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java@@ -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));diff --git a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.javaindex e2ebb342601..3d30898807c 100644--- a/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java+++ b/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java@@ -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);diff --git a/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java b/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.javaindex d36c6896980..50fb75ebee5 100644--- a/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java+++ b/lucene/core/src/java/org/apache/lucene/index/SortedDocValues.java@@ -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 extends BinaryDocValues {}}- // 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() {@Overridepublic int getOrd(int docID) {diff --git a/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java b/lucene/core/src/java/org/apache/lucene/search/FieldComparator.javaindex 6d625c2ce0f..62e9d4d556a 100644--- a/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java+++ b/lucene/core/src/java/org/apache/lucene/search/FieldComparator.java@@ -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.diff --git a/lucene/core/src/java/org/apache/lucene/util/fst/Util.java b/lucene/core/src/java/org/apache/lucene/util/fst/Util.javaindex 452e72f8364..26aa69a06e9 100644--- a/lucene/core/src/java/org/apache/lucene/util/fst/Util.java+++ b/lucene/core/src/java/org/apache/lucene/util/fst/Util.java@@ -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;