mirror of https://github.com/apache/lucene.git
nuke more nocommits
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1436681 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
078e0a1265
commit
36ebc71124
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
@Override
|
||||
public int getOrd(int docID) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue