LUCENE-5879: turn off too-slow term range checking for now

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1671380 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2015-04-05 08:54:02 +00:00
parent ff10738cba
commit 2418769c85
1 changed files with 8 additions and 2 deletions

View File

@ -928,6 +928,7 @@ public class CheckIndex implements Closeable {
if (isIntersect == false) {
throw new RuntimeException("didn't see max term field=" + field + " term=" + maxTerm);
}
//System.out.println(" terms=" + termCount);
return termCount;
}
@ -954,6 +955,7 @@ public class CheckIndex implements Closeable {
int cmp = term.compareTo(maxTerm);
if (cmp == 0) {
// Done!
//System.out.println(" terms=" + termCount);
return termCount;
} else if (cmp > 0) {
throw new RuntimeException("didn't see end term field=" + field + " term=" + maxTerm);
@ -988,7 +990,8 @@ public class CheckIndex implements Closeable {
/** Test Terms.intersect on this range, and validates that it returns the same doc ids as using non-intersect TermsEnum. Returns true if
* any fake terms were seen. */
private static boolean checkSingleTermRange(String field, int maxDoc, Terms terms, BytesRef minTerm, BytesRef maxTerm, FixedBitSet normalDocs, FixedBitSet intersectDocs) throws IOException {
// System.out.println(" check minTerm=" + minTerm + " maxTerm=" + maxTerm);
//System.out.println(" check minTerm=" + minTerm.utf8ToString() + " maxTerm=" + maxTerm.utf8ToString());
assert minTerm.compareTo(maxTerm) <= 0;
TermsEnum termsEnum = terms.iterator(null);
TermsEnum.SeekStatus status = termsEnum.seekCeil(minTerm);
@ -1009,6 +1012,7 @@ public class CheckIndex implements Closeable {
if (normalDocs.equals(intersectDocs) == false) {
throw new RuntimeException("intersect visited different docs than straight terms enum: " + normalDocs.cardinality() + " for straight enum, vs " + intersectDocs.cardinality() + " for intersect, minTerm=" + minTerm + " maxTerm=" + maxTerm);
}
//System.out.println(" docs=" + normalTermCount);
//System.out.println(" " + intersectTermCount + " vs " + normalTermCount);
return intersectTermCount != normalTermCount;
}
@ -1069,6 +1073,7 @@ public class CheckIndex implements Closeable {
lastTerm.copyBytes(term);
}
}
//System.out.println(" count=" + termCount);
if (lastTerm != null && termBounds.isEmpty() == false) {
BytesRef minTerm = termBounds.removeFirst();
@ -1506,7 +1511,8 @@ public class CheckIndex implements Closeable {
long fieldTermCount = (status.delTermCount+status.termCount)-termCountStart;
if (hasFreqs == false) {
// LUCENE-5879: this is just too slow for now:
if (false && hasFreqs == false) {
// For DOCS_ONLY fields we recursively test term ranges:
checkTermRanges(field, maxDoc, fieldTerms, fieldTermCount);
}