lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r927241 [2/2] - in /lucene/java/branches/flex_1458/src: java/org/apache/lucene/index/ java/org/apache/lucene/index/codecs/ java/org/apache/lucene/index/codecs/intblock/ java/org/apache/lucene/index/codecs/preflex/ java/org/apache/lucene/ind...
Date Thu, 25 Mar 2010 00:35:29 GMT
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java?rev=927241&r1=927240&r2=927241&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
Thu Mar 25 00:35:28 2010
@@ -33,7 +33,6 @@ import org.apache.lucene.index.IndexFile
 import org.apache.lucene.index.SegmentInfo;
 import org.apache.lucene.index.Terms;
 import org.apache.lucene.index.TermsEnum;
-import org.apache.lucene.index.codecs.Codec;
 import org.apache.lucene.index.codecs.FieldsProducer;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IndexInput;
@@ -65,8 +64,6 @@ public class StandardTermsDictReader ext
 
   private final TreeMap<String,FieldReader> fields = new TreeMap<String,FieldReader>();
 
-  private final String segment;
-
   // Comparator that orders our terms
   private final Comparator<BytesRef> termComp;
 
@@ -103,7 +100,6 @@ public class StandardTermsDictReader ext
                                  Comparator<BytesRef> termComp, int termsCacheSize)
     throws IOException {
     
-    this.segment = segment;
     this.postingsReader = postingsReader;
     termsCache = new DoubleBarrelLRUCache<FieldAndTerm,TermState>(termsCacheSize);
 
@@ -126,19 +122,12 @@ public class StandardTermsDictReader ext
 
       final int numFields = in.readInt();
 
-      if (Codec.DEBUG) {
-        System.out.println(Thread.currentThread().getName() + ": stdr create seg=" + segment
+ " numFields=" + numFields + " hasProx?=" + fieldInfos.hasProx());
-      }
-
       for(int i=0;i<numFields;i++) {
         final int field = in.readInt();
         final long numTerms = in.readLong();
         final long termsStartPointer = in.readLong();
         final StandardTermsIndexReader.FieldReader fieldIndexReader;
         final FieldInfo fieldInfo = fieldInfos.fieldInfo(field);
-        if (Codec.DEBUG) {
-          System.out.println("  stdr: load field=" + fieldInfo.name + " numTerms=" + numTerms);
-        }
         fieldIndexReader = indexReader.getField(fieldInfo);
         if (numTerms > 0) {
           assert !fields.containsKey(fieldInfo.name);
@@ -204,9 +193,6 @@ public class StandardTermsDictReader ext
 
   @Override
   public Terms terms(String field) throws IOException {
-    if (Codec.DEBUG) {
-      System.out.println("stdr.terms field=" + field + " found=" + fields.get(field));
-    }
     return fields.get(field);
   }
 
@@ -221,15 +207,8 @@ public class StandardTermsDictReader ext
 
     @Override
     public String next() {
-      if (Codec.DEBUG) {
-        System.out.println("stdr.tfe.next seg=" + segment);
-        //new Throwable().printStackTrace(System.out);
-      }
       if (it.hasNext()) {
         current = it.next();
-        if (Codec.DEBUG) {
-          System.out.println("  hasNext set current field=" + current.fieldInfo.name);
-        }
         return current.fieldInfo.name;
       } else {
         current = null;
@@ -286,9 +265,6 @@ public class StandardTermsDictReader ext
       private final FieldAndTerm fieldTerm = new FieldAndTerm();
 
       SegmentTermsEnum() throws IOException {
-        if (Codec.DEBUG) {
-          System.out.println("tdr " + this + ": CREATE TermsEnum field=" + fieldInfo.name
+ " startPos=" + termsStartPointer + " seg=" + segment);
-        }
         in = (IndexInput) StandardTermsDictReader.this.in.clone();
         in.seek(termsStartPointer);
         bytesReader = new DeltaBytesReader(in);
@@ -308,12 +284,6 @@ public class StandardTermsDictReader ext
        *  was found, SeekStatus.END if we hit EOF */
       @Override
       public SeekStatus seek(BytesRef term) throws IOException {
-
-        if (Codec.DEBUG) {
-          Codec.debug("stdr.seek(text=" + fieldInfo.name + ":" + term + ") seg=" + segment);
-          new Throwable().printStackTrace(System.out);
-        }
-
         // Check cache
         fieldTerm.term = term;
         TermState cachedState = termsCache.get(fieldTerm);
@@ -325,17 +295,9 @@ public class StandardTermsDictReader ext
           seekPending = true;
           bytesReader.term.copy(term);
 
-          if (Codec.DEBUG) {
-            Codec.debug("  cache hit!  term=" + bytesReader.term + " " + cachedState);
-          }
-
           return SeekStatus.FOUND;
         }
 
-        if (Codec.DEBUG) {
-          Codec.debug("  cache miss!");
-        }
-
         boolean doSeek = true;
 
         if (state.ord != -1) {
@@ -345,10 +307,6 @@ public class StandardTermsDictReader ext
 
           if (cmp == 0) {
             // already at the requested term
-            if (Codec.DEBUG) {
-              Codec.debug("  already here!");
-            }
-
             return SeekStatus.FOUND;
           }
 
@@ -371,10 +329,6 @@ public class StandardTermsDictReader ext
           // our text:
           indexReader.getIndexOffset(term, indexResult);
 
-          if (Codec.DEBUG) {
-            Codec.debug(" index pos=" + indexResult.position + " termFP=" + indexResult.offset
+ " term=" + indexResult.term.utf8ToString() + " this=" + this);
-          }
-
           in.seek(indexResult.offset);
           seekPending = false;
 
@@ -390,24 +344,14 @@ public class StandardTermsDictReader ext
           assert state.ord >= -1: "ord=" + state.ord;
 
           startOrd = indexResult.position;
-
-          if (Codec.DEBUG) {
-            Codec.debug("  set ord=" + state.ord);
-          }
         } else {
           startOrd = -1;
-          if (Codec.DEBUG) {
-            Codec.debug(": use scanning only (no seek)");
-          }
         }
 
         // Now scan:
         while(next() != null) {
           final int cmp = termComp.compare(bytesReader.term, term);
           if (cmp == 0) {
-            if (Codec.DEBUG) {
-              Codec.debug("  seek done found term=" + bytesReader.term);
-            }
 
             if (doSeek) {
               // Store in cache
@@ -416,19 +360,10 @@ public class StandardTermsDictReader ext
               // this is fp after current term
               cachedState.filePointer = in.getFilePointer();
               termsCache.put(entryKey, cachedState);
-              if (Codec.DEBUG) {
-                Codec.debug("  save to cache  term=" + fieldTerm.term + " " + cachedState);
-              }
-            }
-            if (Codec.DEBUG) {
-              Codec.debug("  found term=" + fieldTerm.term);
             }
               
             return SeekStatus.FOUND;
           } else if (cmp > 0) {
-            if (Codec.DEBUG) {
-              Codec.debug("  seek done did not find term=" + term + " found instead: " +
bytesReader.term);
-            }
             return SeekStatus.NOT_FOUND;
           }
 
@@ -440,10 +375,6 @@ public class StandardTermsDictReader ext
           assert state.ord == startOrd || !indexReader.isIndexTerm(state.ord, state.docFreq,
true);
         }
 
-        if (Codec.DEBUG) {
-          Codec.debug("  seek done did not find term=" + term + ": hit EOF");
-        }
-
         return SeekStatus.END;
       }
 
@@ -494,32 +425,18 @@ public class StandardTermsDictReader ext
       @Override
       public BytesRef next() throws IOException {
 
-        if (Codec.DEBUG) {
-          Codec.debug("tdr.next: field=" + fieldInfo.name + " tis.fp=" + in.getFilePointer()
+ " vs len=" + in.length() + " seg=" + segment);
-        }
-
         if (seekPending) {
-          if (Codec.DEBUG) {
-            Codec.debug("  do pending seek " + state);
-          }
           seekPending = false;
           in.seek(state.filePointer);
         }
         
         if (state.ord >= numTerms-1) {
-          if (Codec.DEBUG) {
-            Codec.debug("  return null ord=" + state.ord + " vs numTerms-1=" + (numTerms-1));
-          }
           return null;
         }
 
         bytesReader.read();
         state.docFreq = in.readVInt();
 
-        if (Codec.DEBUG) {
-          Codec.debug("  text=" + bytesReader.term.utf8ToString() + " freq=" + state.docFreq
+ " tis=" + in);
-        }
-
         // TODO: would be cleaner, but space-wasting, to
         // simply record a bit into each index entry as to
         // whether it's an index entry or not, rather than
@@ -533,10 +450,6 @@ public class StandardTermsDictReader ext
 
         state.ord++;
 
-        if (Codec.DEBUG) {
-          Codec.debug("  ord=" + state.ord + " vs numTerms=" + numTerms + " fp=" + in.getFilePointer());
-        }
-
         return bytesReader.term;
       }
 
@@ -547,33 +460,17 @@ public class StandardTermsDictReader ext
 
       @Override
       public DocsEnum docs(Bits skipDocs, DocsEnum reuse) throws IOException {
-        if (Codec.DEBUG) {
-          System.out.println("stdr.docs");
-        }
         DocsEnum docsEnum = postingsReader.docs(fieldInfo, state, skipDocs, reuse);
         assert docsEnum != null;
-        if (Codec.DEBUG) {
-          docsEnum.desc = fieldInfo.name + ":" + bytesReader.term.utf8ToString();
-        }
         return docsEnum;
       }
 
       @Override
       public DocsAndPositionsEnum docsAndPositions(Bits skipDocs, DocsAndPositionsEnum reuse)
throws IOException {
-        if (Codec.DEBUG) {
-          System.out.println("stdr.docsAndPositions omitTF=" + fieldInfo.omitTermFreqAndPositions);
-        }
         if (fieldInfo.omitTermFreqAndPositions) {
           return null;
         } else {
-          DocsAndPositionsEnum postingsEnum = postingsReader.docsAndPositions(fieldInfo,
state, skipDocs, reuse);
-          if (postingsEnum != null) {
-            if (Codec.DEBUG) {
-              postingsEnum.desc = fieldInfo.name + ":" + bytesReader.term.utf8ToString();
-              Codec.debug("  return enum=" + postingsEnum);
-            }
-          }
-          return postingsEnum;
+          return postingsReader.docsAndPositions(fieldInfo, state, skipDocs, reuse);
         }
       }
     }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java?rev=927241&r1=927240&r2=927241&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
Thu Mar 25 00:35:28 2010
@@ -27,7 +27,6 @@ import org.apache.lucene.index.FieldInfo
 import org.apache.lucene.index.IndexFileNames;
 import org.apache.lucene.index.SegmentWriteState;
 import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.index.codecs.Codec;
 import org.apache.lucene.index.codecs.FieldsConsumer;
 import org.apache.lucene.index.codecs.PostingsConsumer;
 import org.apache.lucene.index.codecs.TermsConsumer;
@@ -64,8 +63,6 @@ public class StandardTermsDictWriter ext
   private final List<TermsConsumer> fields = new ArrayList<TermsConsumer>();
   private final Comparator<BytesRef> termComp;
 
-  private String segment;
-
   public StandardTermsDictWriter(StandardTermsIndexWriter indexWriter, SegmentWriteState
state, StandardPostingsWriter postingsWriter, Comparator<BytesRef> termComp) throws
IOException {
     final String termsFileName = IndexFileNames.segmentFileName(state.segmentName, StandardCodec.TERMS_EXTENSION);
     this.indexWriter = indexWriter;
@@ -73,11 +70,6 @@ public class StandardTermsDictWriter ext
     out = state.directory.createOutput(termsFileName);
     indexWriter.setTermsOutput(out);
     state.flushedFiles.add(termsFileName);
-    this.segment = state.segmentName;
-
-    if (Codec.DEBUG) {
-      System.out.println("stdw: write to segment=" + state.segmentName);
-    }
 
     fieldInfos = state.fieldInfos;
 
@@ -95,9 +87,6 @@ public class StandardTermsDictWriter ext
 
   @Override
   public TermsConsumer addField(FieldInfo field) {
-    if (Codec.DEBUG) {
-      System.out.println("stdw.addField: field=" + field.name);
-    }
     assert currentField == null || currentField.name.compareTo(field.name) < 0;
     currentField = field;
     StandardTermsIndexWriter.FieldWriter fieldIndexWriter = indexWriter.addField(field);
@@ -109,16 +98,9 @@ public class StandardTermsDictWriter ext
   @Override
   public void close() throws IOException {
 
-    if (Codec.DEBUG) {
-      System.out.println("stdw.close seg=" + segment);
-    }
-
     try {
       final int fieldCount = fields.size();
 
-      if (Codec.DEBUG)
-        System.out.println("  numFields=" + fieldCount);
-
       final long dirStart = out.getFilePointer();
 
       out.writeInt(fieldCount);
@@ -127,8 +109,6 @@ public class StandardTermsDictWriter ext
         out.writeInt(field.fieldInfo.number);
         out.writeLong(field.numTerms);
         out.writeLong(field.termsStartPointer);
-        if (Codec.DEBUG)
-          System.out.println("stdw.close: field=" + field.fieldInfo.name + " numTerms=" +
field.numTerms + " tis pointer=" + field.termsStartPointer);
       }
       out.seek(CodecUtil.headerLength(CODEC_NAME));
       out.writeLong(dirStart);
@@ -160,10 +140,6 @@ public class StandardTermsDictWriter ext
       termsStartPointer = out.getFilePointer();
       postingsWriter.setField(fieldInfo);
       this.postingsWriter = postingsWriter;
-
-      if (Codec.DEBUG) {
-        System.out.println("stdw: now write field=" + fieldInfo.name);
-      }
     }
     
     @Override
@@ -174,10 +150,6 @@ public class StandardTermsDictWriter ext
     @Override
     public PostingsConsumer startTerm(BytesRef text) throws IOException {
       postingsWriter.startTerm();
-      if (Codec.DEBUG) {
-        postingsWriter.desc = fieldInfo.name + ":" + text.utf8ToString();
-        System.out.println("stdw.startTerm term=" + fieldInfo.name + ":" + text.utf8ToString()
+ " seg=" + segment);
-      }
       return postingsWriter;
     }
 
@@ -186,16 +158,8 @@ public class StandardTermsDictWriter ext
 
       assert numDocs > 0;
 
-      if (Codec.DEBUG) {
-        Codec.debug("finishTerm seg=" + segment + " text=" + fieldInfo.name + ":" + text.utf8ToString()
+ " numDocs=" + numDocs + " numTerms=" + numTerms);
-      }
-
       final boolean isIndexTerm = fieldIndexWriter.checkIndexTerm(text, numDocs);
 
-      if (Codec.DEBUG) {
-        Codec.debug("  tis.fp=" + out.getFilePointer() + " isIndexTerm?=" + isIndexTerm);
-        System.out.println("  term bytes=" + text.utf8ToString());
-      }
       termWriter.write(text);
       out.writeVInt(numDocs);
 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCodecs.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCodecs.java?rev=927241&r1=927240&r2=927241&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCodecs.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCodecs.java Thu Mar
25 00:35:28 2010
@@ -137,8 +137,6 @@ public class TestCodecs extends MultiCod
     }
 
     public void write(final FieldsConsumer consumer) throws Throwable {
-      if (Codec.DEBUG)
-        System.out.println("WRITE field=" + fieldInfo.name);
       Arrays.sort(terms);
       final TermsConsumer termsConsumer = consumer.addField(fieldInfo);
       for (final TermData term : terms)
@@ -176,8 +174,6 @@ public class TestCodecs extends MultiCod
     }
 
     public void write(final TermsConsumer termsConsumer) throws Throwable {
-      if (Codec.DEBUG)
-        System.out.println("  term=" + text2);
       final PostingsConsumer postingsConsumer = termsConsumer.startTerm(text);
       for(int i=0;i<docs.length;i++) {
         final int termDocFreq;
@@ -324,10 +320,6 @@ public class TestCodecs extends MultiCod
     this.write(fieldInfos, dir, fields);
     final SegmentInfo si = new SegmentInfo(SEGMENT, 10000, dir, CodecProvider.getDefault().getWriter(null));
 
-    if (Codec.DEBUG) {
-      System.out.println("\nTEST: now read");
-    }
-
     final FieldsProducer terms = si.getCodec().fieldsProducer(new SegmentReadState(dir, si,
fieldInfos, 1024, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR));
 
     final Verify[] threads = new Verify[NUM_TEST_THREADS-1];
@@ -418,14 +410,6 @@ public class TestCodecs extends MultiCod
 
   }
 
-  private String getDesc(final FieldData field, final TermData term) {
-    return field.fieldInfo.name + ":" + term.text2;
-  }
-
-  private String getDesc(final FieldData field, final TermData term, final int doc) {
-    return this.getDesc(field, term) + ":" + doc;
-  }
-
   private class Verify extends Thread {
     final Fields termsDict;
     final FieldData[] fields;
@@ -463,24 +447,13 @@ public class TestCodecs extends MultiCod
     private void verifyPositions(final PositionData[] positions, final DocsAndPositionsEnum
posEnum) throws Throwable {
       for(int i=0;i<positions.length;i++) {
         final int pos = posEnum.nextPosition();
-        if (Codec.DEBUG) {
-          System.out.println("TEST pos " + (1+i) + " of " + positions.length + " pos=" +
pos);
-        }
         assertEquals(positions[i].pos, pos);
         if (positions[i].payload != null) {
           assertTrue(posEnum.hasPayload());
           if (TestCodecs.this.nextInt(3) < 2) {
             // Verify the payload bytes
             final BytesRef otherPayload = posEnum.getPayload();
-            if (Codec.DEBUG) {
-              System.out.println("TEST do check payload len=" + posEnum.getPayloadLength()
+ " vs " + (otherPayload == null ? "null" : otherPayload.length));
-            }
-
             assertTrue("expected=" + positions[i].payload.toString() + " got=" + otherPayload.toString(),
positions[i].payload.equals(otherPayload));
-          } else {
-            if (Codec.DEBUG) {
-              System.out.println("TEST skip check payload len=" + posEnum.getPayloadLength());
-            }
           }
         } else {
           assertFalse(posEnum.hasPayload());
@@ -492,34 +465,20 @@ public class TestCodecs extends MultiCod
 
       for(int iter=0;iter<NUM_TEST_ITER;iter++) {
         final FieldData field = fields[TestCodecs.this.nextInt(fields.length)];
-        if (Codec.DEBUG) {
-          System.out.println("verify field=" + field.fieldInfo.name);
-        }
-
         final TermsEnum termsEnum = termsDict.terms(field.fieldInfo.name).iterator();
 
         // Test straight enum of the terms:
-        if (Codec.DEBUG) {
-          System.out.println("\nTEST: pure enum");
-        }
-
         int upto = 0;
         while(true) {
           final BytesRef term = termsEnum.next();
           if (term == null) {
             break;
           }
-          if (Codec.DEBUG) {
-            System.out.println("check " + upto + ": " + field.terms[upto].text2);
-          }
           assertTrue(new BytesRef(field.terms[upto++].text2).bytesEquals(term));
         }
         assertEquals(upto, field.terms.length);
 
         // Test random seek:
-        if (Codec.DEBUG) {
-          System.out.println("\nTEST: random seek");
-        }
         TermData term = field.terms[TestCodecs.this.nextInt(field.terms.length)];
         TermsEnum.SeekStatus status = termsEnum.seek(new BytesRef(term.text2));
         assertEquals(status, TermsEnum.SeekStatus.FOUND);
@@ -544,8 +503,6 @@ public class TestCodecs extends MultiCod
         }
 
         // Test seek to non-existent terms:
-        if (Codec.DEBUG)
-          System.out.println("\nTEST: seek to non-existent term");
         for(int i=0;i<100;i++) {
           final char[] text = TestCodecs.this.getRandomText();
           final String text2 = new String(text, 0, text.length-1) + ".";
@@ -555,25 +512,13 @@ public class TestCodecs extends MultiCod
         }
 
         // Seek to each term, backwards:
-        if (Codec.DEBUG) {
-          System.out.println("\n" + Thread.currentThread().getName() + ": TEST: seek backwards
through terms");
-        }
         for(int i=field.terms.length-1;i>=0;i--) {
-          if (Codec.DEBUG) {
-            System.out.println(Thread.currentThread().getName() + ": TEST: term=" + field.terms[i].text2
+ " has docFreq=" + field.terms[i].docs.length);
-          }
           assertEquals(Thread.currentThread().getName() + ": field=" + field.fieldInfo.name
+ " term=" + field.terms[i].text2, TermsEnum.SeekStatus.FOUND, termsEnum.seek(new BytesRef(field.terms[i].text2)));
           assertEquals(field.terms[i].docs.length, termsEnum.docFreq());
         }
 
         // Seek to each term by ord, backwards
-        if (Codec.DEBUG) {
-          System.out.println("\n" + Thread.currentThread().getName() + ": TEST: seek backwards
through terms, by ord");
-        }
         for(int i=field.terms.length-1;i>=0;i--) {
-          if (Codec.DEBUG) {
-            System.out.println(Thread.currentThread().getName() + ": TEST: term=" + field.terms[i].text2
+ " has docFreq=" + field.terms[i].docs.length);
-          }
           assertEquals(Thread.currentThread().getName() + ": field=" + field.fieldInfo.name
+ " term=" + field.terms[i].text2, TermsEnum.SeekStatus.FOUND, termsEnum.seek(i));
           assertEquals(field.terms[i].docs.length, termsEnum.docFreq());
           assertTrue(termsEnum.term().bytesEquals(new BytesRef(field.terms[i].text2)));
@@ -588,17 +533,11 @@ public class TestCodecs extends MultiCod
         assertTrue(termsEnum.term().bytesEquals(new BytesRef(field.terms[0].text2)));
 
         // Test docs enum
-        if (Codec.DEBUG) {
-          System.out.println("\nTEST: docs/positions");
-        }
         termsEnum.seek(new BytesRef(""));
         upto = 0;
         do {
           term = field.terms[upto];
           if (TestCodecs.this.nextInt(3) == 1) {
-            if (Codec.DEBUG) {
-              System.out.println("\nTEST [" + TestCodecs.this.getDesc(field, term) + "]:
iterate docs...");
-            }
             final DocsEnum docs = termsEnum.docs(null, null);
             final DocsAndPositionsEnum postings = termsEnum.docsAndPositions(null, null);
 
@@ -616,10 +555,6 @@ public class TestCodecs extends MultiCod
               if (TestCodecs.this.nextInt(3) == 1 && left >= 1) {
                 final int inc = 1+TestCodecs.this.nextInt(left-1);
                 upto2 += inc;
-                if (Codec.DEBUG) {
-                  System.out.println("TEST [" + TestCodecs.this.getDesc(field, term) + "]:
skip: " + left + " docs left; skip to doc=" + term.docs[upto2] + " [" + upto2 + " of " + term.docs.length
+ "]");
-                }
-
                 if (TestCodecs.this.nextInt(2) == 1) {
                   doc = docsEnum.advance(term.docs[upto2]);
                   assertEquals(term.docs[upto2], doc);
@@ -640,31 +575,18 @@ public class TestCodecs extends MultiCod
               } else {
                 doc = docsEnum.nextDoc();
                 assertTrue(doc != -1);
-                if (Codec.DEBUG) {
-                  System.out.println("TEST [" + TestCodecs.this.getDesc(field, term) + "]:
got next doc...");
-                }
                 upto2++;
               }
               assertEquals(term.docs[upto2], doc);
               if (!field.omitTF) {
                 assertEquals(term.positions[upto2].length, docsEnum.freq());
                 if (TestCodecs.this.nextInt(2) == 1) {
-                  if (Codec.DEBUG) {
-                    System.out.println("TEST [" + TestCodecs.this.getDesc(field, term, term.docs[upto2])
+ "]: check positions for doc " + term.docs[upto2] + "...");
-                  }
                   this.verifyPositions(term.positions[upto2], postings);
-                } else if (Codec.DEBUG) {
-                  System.out.println("TEST: skip positions...");
                 }
-              } else if (Codec.DEBUG) {
-                System.out.println("TEST: skip positions: omitTF=true");
               }
             }
 
             assertEquals(DocIdSetIterator.NO_MORE_DOCS, docsEnum.nextDoc());
-
-          } else if (Codec.DEBUG) {
-            System.out.println("\nTEST [" + TestCodecs.this.getDesc(field, term) + "]: skip
docs");
           }
           upto++;
 



Mime
View raw message