lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1672749 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
Date Fri, 10 Apr 2015 20:10:45 GMT
Author: mikemccand
Date: Fri Apr 10 20:10:45 2015
New Revision: 1672749

URL: http://svn.apache.org/r1672749
Log:
LUCENE-5879: turn off too-slow term range checking for now

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java?rev=1672749&r1=1672748&r2=1672749&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
Fri Apr 10 20:10:45 2015
@@ -947,6 +947,7 @@ public class CheckIndex implements Close
         if (isIntersect == false) {
           throw new RuntimeException("didn't see max term field=" + field + " term=" + maxTerm);
         }
+        //System.out.println("      terms=" + termCount);
         return termCount;
       }
 
@@ -973,6 +974,7 @@ public class CheckIndex implements Close
         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);
@@ -1007,7 +1009,8 @@ public class CheckIndex implements Close
   /** 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();
     TermsEnum.SeekStatus status = termsEnum.seekCeil(minTerm);
@@ -1028,6 +1031,7 @@ public class CheckIndex implements Close
     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;
   }
@@ -1087,6 +1091,7 @@ public class CheckIndex implements Close
           lastTerm.copyBytes(term);
         }
       }
+      //System.out.println("    count=" + termCount);
 
       if (lastTerm != null && termBounds.isEmpty() == false) {
         BytesRef minTerm = termBounds.removeFirst();
@@ -1524,7 +1529,8 @@ public class CheckIndex implements Close
 
         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);
         }



Mime
View raw message