lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1201968 [2/2] - in /lucene/dev/branches/lucene2621: lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/ lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/ lucene/contrib/memory/src/java/org/ap...
Date Tue, 15 Nov 2011 00:01:46 GMT
Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java Tue Nov 15 00:01:43 2011
@@ -323,7 +323,7 @@ public class TestStressIndexing2 extends
                  MultiFields.getFields(r2).terms(idField) == null);
       return;
     }
-    final TermsEnum termsEnum = terms1.iterator();
+    final TermsEnum termsEnum = terms1.iterator(null);
 
     final Bits liveDocs1 = MultiFields.getLiveDocs(r1);
     final Bits liveDocs2 = MultiFields.getLiveDocs(r2);
@@ -397,7 +397,7 @@ public class TestStressIndexing2 extends
             System.out.println("    " + field + ":");
             Terms terms3 = fieldsEnum.terms();
             assertNotNull(terms3);
-            TermsEnum termsEnum2 = terms3.iterator();
+            TermsEnum termsEnum2 = terms3.iterator(null);
             BytesRef term2;
             while((term2 = termsEnum2.next()) != null) {
               System.out.println("      " + term2.utf8ToString() + ": freq=" + termsEnum2.totalTermFreq());
@@ -431,7 +431,7 @@ public class TestStressIndexing2 extends
             System.out.println("    " + field + ":");
             Terms terms3 = fieldsEnum.terms();
             assertNotNull(terms3);
-            TermsEnum termsEnum2 = terms3.iterator();
+            TermsEnum termsEnum2 = terms3.iterator(null);
             BytesRef term2;
             while((term2 = termsEnum2.next()) != null) {
               System.out.println("      " + term2.utf8ToString() + ": freq=" + termsEnum2.totalTermFreq());
@@ -490,7 +490,7 @@ public class TestStressIndexing2 extends
             if (terms == null) {
               continue;
             }
-            termsEnum1 = terms.iterator();
+            termsEnum1 = terms.iterator(null);
           }
         }
         term1 = termsEnum1.next();
@@ -524,7 +524,7 @@ public class TestStressIndexing2 extends
             if (terms == null) {
               continue;
             }
-            termsEnum2 = terms.iterator();
+            termsEnum2 = terms.iterator(null);
           }
         }
         term2 = termsEnum2.next();
@@ -607,11 +607,11 @@ public class TestStressIndexing2 extends
 
       Terms terms1 = fieldsEnum1.terms();
       assertNotNull(terms1);
-      TermsEnum termsEnum1 = terms1.iterator();
+      TermsEnum termsEnum1 = terms1.iterator(null);
 
       Terms terms2 = fieldsEnum2.terms();
       assertNotNull(terms2);
-      TermsEnum termsEnum2 = terms2.iterator();
+      TermsEnum termsEnum2 = terms2.iterator(null);
 
       DocsAndPositionsEnum dpEnum1 = null;
       DocsAndPositionsEnum dpEnum2 = null;
@@ -630,8 +630,9 @@ public class TestStressIndexing2 extends
         if (dpEnum1 != null) {
           assertNotNull(dpEnum2);
           int docID1 = dpEnum1.nextDoc();
-          int docID2 = dpEnum2.nextDoc();
+          dpEnum2.nextDoc();
           // docIDs are not supposed to be equal
+          //int docID2 = dpEnum2.nextDoc();
           //assertEquals(docID1, docID2);
           assertTrue(docID1 != DocsEnum.NO_MORE_DOCS);
           
@@ -666,8 +667,9 @@ public class TestStressIndexing2 extends
           assertNotNull(dEnum1);
           assertNotNull(dEnum2);
           int docID1 = dEnum1.nextDoc();
-          int docID2 = dEnum2.nextDoc();
+          dEnum2.nextDoc();
           // docIDs are not supposed to be equal
+          //int docID2 = dEnum2.nextDoc();
           //assertEquals(docID1, docID2);
           assertTrue(docID1 != DocsEnum.NO_MORE_DOCS);
           int freq1 = dEnum1.freq();

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java Tue Nov 15 00:01:43 2011
@@ -92,7 +92,7 @@ public class TestSumDocFreq extends Luce
       }
       
       long computedSumDocFreq = 0;
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
       while (termsEnum.next() != null) {
         computedSumDocFreq += termsEnum.docFreq();
       }

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsReader.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsReader.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsReader.java Tue Nov 15 00:01:43 2011
@@ -192,7 +192,7 @@ public class TestTermVectorsReader exten
       Terms vector = reader.get(j).terms(testFields[0]);
       assertNotNull(vector);
       assertEquals(testTerms.length, vector.getUniqueTermCount());
-      TermsEnum termsEnum = vector.iterator();
+      TermsEnum termsEnum = vector.iterator(null);
       for (int i = 0; i < testTerms.length; i++) {
         final BytesRef text = termsEnum.next();
         assertNotNull(text);
@@ -211,7 +211,7 @@ public class TestTermVectorsReader exten
     Terms vector = reader.get(0).terms(testFields[0]);
     assertNotNull(vector);
     assertEquals(testTerms.length, vector.getUniqueTermCount());
-    TermsEnum termsEnum = vector.iterator();
+    TermsEnum termsEnum = vector.iterator(null);
     DocsAndPositionsEnum dpEnum = null;
     for (int i = 0; i < testTerms.length; i++) {
       final BytesRef text = termsEnum.next();
@@ -246,7 +246,7 @@ public class TestTermVectorsReader exten
     Terms freqVector = reader.get(0).terms(testFields[1]); //no pos, no offset
     assertNotNull(freqVector);
     assertEquals(testTerms.length, freqVector.getUniqueTermCount());
-    termsEnum = freqVector.iterator();
+    termsEnum = freqVector.iterator(null);
     assertNotNull(termsEnum);
     for (int i = 0; i < testTerms.length; i++) {
       final BytesRef text = termsEnum.next();
@@ -262,7 +262,7 @@ public class TestTermVectorsReader exten
     DefaultTermVectorsReader reader = new DefaultTermVectorsReader(dir, seg, fieldInfos, newIOContext(random));
     Terms vector = reader.get(0).terms(testFields[0]);
     assertNotNull(vector);
-    TermsEnum termsEnum = vector.iterator();
+    TermsEnum termsEnum = vector.iterator(null);
     assertNotNull(termsEnum);
     assertEquals(testTerms.length, vector.getUniqueTermCount());
     DocsAndPositionsEnum dpEnum = null;

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java Tue Nov 15 00:01:43 2011
@@ -62,7 +62,7 @@ public class TestTermVectorsWriter exten
     IndexReader r = IndexReader.open(dir, true);
     Terms vector = r.getTermVectors(0).terms("field");
     assertNotNull(vector);
-    TermsEnum termsEnum = vector.iterator();
+    TermsEnum termsEnum = vector.iterator(null);
     assertNotNull(termsEnum.next());
     assertEquals("", termsEnum.term().utf8ToString());
 
@@ -120,7 +120,7 @@ public class TestTermVectorsWriter exten
     w.close();
 
     IndexReader r = IndexReader.open(dir, true);
-    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator();
+    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
     OffsetAttribute offsetAtt = dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -157,7 +157,7 @@ public class TestTermVectorsWriter exten
     w.close();
 
     IndexReader r = IndexReader.open(dir, true);
-    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator();
+    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
     OffsetAttribute offsetAtt = dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -198,7 +198,7 @@ public class TestTermVectorsWriter exten
     w.close();
 
     IndexReader r = IndexReader.open(dir, true);
-    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator();
+    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
     OffsetAttribute offsetAtt = dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -236,7 +236,7 @@ public class TestTermVectorsWriter exten
     w.close();
 
     IndexReader r = IndexReader.open(dir, true);
-    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator();
+    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
     OffsetAttribute offsetAtt = dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -275,7 +275,7 @@ public class TestTermVectorsWriter exten
     w.close();
 
     IndexReader r = IndexReader.open(dir, true);
-    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator();
+    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
     OffsetAttribute offsetAtt = dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -326,7 +326,7 @@ public class TestTermVectorsWriter exten
     w.close();
 
     IndexReader r = IndexReader.open(dir, true);
-    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator();
+    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
     OffsetAttribute offsetAtt = dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -373,7 +373,7 @@ public class TestTermVectorsWriter exten
     w.close();
 
     IndexReader r = IndexReader.open(dir, true);
-    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator();
+    TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
     OffsetAttribute offsetAtt = dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -561,7 +561,6 @@ public class TestTermVectorsWriter exten
 
     FieldType customType = new FieldType(StringField.TYPE_UNSTORED);
     customType.setStoreTermVectors(true);
-    Field termVectorField = newField("termVector", "termVector", customType2);
     document.add(newField("tvtest", "a b c", customType));
     iw.addDocument(document);
     // Make 2nd segment
@@ -580,7 +579,6 @@ public class TestTermVectorsWriter exten
     Document document = new Document();
     FieldType customType = new FieldType(StringField.TYPE_UNSTORED);
     customType.setStoreTermVectors(true);
-    Field termVectorField = newField("termVector", "termVector", customType);
     document.add(newField("tvtest", "a b c", customType));
     iw.addDocument(document);
     iw.commit();

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java Tue Nov 15 00:01:43 2011
@@ -113,7 +113,7 @@ public class TestTermdocPerf extends Luc
 
     IndexReader reader = IndexReader.open(dir, true);
 
-    TermsEnum tenum = MultiFields.getTerms(reader, "foo").iterator();
+    TermsEnum tenum = MultiFields.getTerms(reader, "foo").iterator(null);
 
     start = System.currentTimeMillis();
 

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum.java Tue Nov 15 00:01:43 2011
@@ -62,7 +62,7 @@ public class TestTermsEnum extends Lucen
     w.close();
 
     final List<BytesRef> terms = new ArrayList<BytesRef>();
-    final TermsEnum termsEnum = MultiFields.getTerms(r, "body").iterator();
+    final TermsEnum termsEnum = MultiFields.getTerms(r, "body").iterator(null);
     BytesRef term;
     while((term = termsEnum.next()) != null) {
       terms.add(new BytesRef(term));
@@ -485,7 +485,7 @@ public class TestTermsEnum extends Lucen
     assertEquals(1, docFreq(r, "xx"));
     assertEquals(1, docFreq(r, "aa4"));
 
-    final TermsEnum te = MultiFields.getTerms(r, FIELD).iterator();
+    final TermsEnum te = MultiFields.getTerms(r, FIELD).iterator(null);
     while(te.next() != null) {
       //System.out.println("TEST: next term=" + te.term().utf8ToString());
     }
@@ -517,7 +517,7 @@ public class TestTermsEnum extends Lucen
     assertEquals(1, r.maxDoc());
     Terms terms = MultiFields.getTerms(r, "field");
     if (terms != null) {
-      assertNull(terms.iterator().next());
+      assertNull(terms.iterator(null).next());
     }
     r.close();
     d.close();
@@ -617,7 +617,7 @@ public class TestTermsEnum extends Lucen
         System.out.println("  " + t.utf8ToString() + " " + t);
       }
     }
-    final TermsEnum te = MultiFields.getTerms(r, FIELD).iterator();
+    final TermsEnum te = MultiFields.getTerms(r, FIELD).iterator(null);
 
     final int END_LOC = -validTerms.length-1;
     

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum2.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum2.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/TestTermsEnum2.java Tue Nov 15 00:01:43 2011
@@ -117,7 +117,7 @@ public class TestTermsEnum2 extends Luce
     for (int i = 0; i < numIterations; i++) {
       String reg = AutomatonTestUtil.randomRegexp(random);
       Automaton automaton = new RegExp(reg, RegExp.NONE).toAutomaton();
-      TermsEnum te = MultiFields.getTerms(reader, "field").iterator();
+      TermsEnum te = MultiFields.getTerms(reader, "field").iterator(null);
       ArrayList<BytesRef> unsortedTerms = new ArrayList<BytesRef>(terms);
       Collections.shuffle(unsortedTerms, random);
 
@@ -140,7 +140,7 @@ public class TestTermsEnum2 extends Luce
   /** mixes up seek and next for all terms */
   public void testSeekingAndNexting() throws Exception {
     for (int i = 0; i < numIterations; i++) {
-      TermsEnum te = MultiFields.getTerms(reader, "field").iterator();
+      TermsEnum te = MultiFields.getTerms(reader, "field").iterator(null);
 
       for (BytesRef term : terms) {
         int c = random.nextInt(3);

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestSurrogates.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestSurrogates.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestSurrogates.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestSurrogates.java Tue Nov 15 00:01:43 2011
@@ -110,7 +110,7 @@ public class TestSurrogates extends Luce
       while((field = fieldsEnum.next()) != null) {
         Terms terms = fieldsEnum.terms();
         assertNotNull(terms);
-        TermsEnum termsEnum = terms.iterator();
+        TermsEnum termsEnum = terms.iterator(null);
         BytesRef text;
         BytesRef lastText = null;
         while((text = termsEnum.next()) != null) {
@@ -164,7 +164,7 @@ public class TestSurrogates extends Luce
       // seek to it
       TermsEnum te = tes.get(field);
       if (te == null) {
-        te = MultiFields.getTerms(reader, field).iterator();
+        te = MultiFields.getTerms(reader, field).iterator(null);
         tes.put(field, te);
       }
 
@@ -229,7 +229,7 @@ public class TestSurrogates extends Luce
           // term does not exist:
           TermsEnum te = tes.get(field);
           if (te == null) {
-            te = MultiFields.getTerms(reader, field).iterator();
+            te = MultiFields.getTerms(reader, field).iterator(null);
             tes.put(field, te);
           }
 

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestTermInfosReaderIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestTermInfosReaderIndex.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestTermInfosReaderIndex.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/lucene3x/TestTermInfosReaderIndex.java Tue Nov 15 00:01:43 2011
@@ -147,7 +147,7 @@ public class TestTermInfosReaderIndex ex
     while((field = fieldsEnum.next()) != null) {
       Terms terms = fieldsEnum.terms();
       assertNotNull(terms);
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
       while (termsEnum.next() != null) {
         if (sample.size() >= size) {
           int pos = random.nextInt(size);

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/Test10KPulsings.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/Test10KPulsings.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/Test10KPulsings.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/Test10KPulsings.java Tue Nov 15 00:01:43 2011
@@ -35,13 +35,10 @@ import org.apache.lucene.index.MultiFiel
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.TermsEnum;
 import org.apache.lucene.index.codecs.Codec;
-import org.apache.lucene.index.codecs.PostingsFormat;
-import org.apache.lucene.index.codecs.lucene40.Lucene40PostingsBaseFormat;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util._TestUtil;
-import org.junit.Ignore;
 
 /**
  * Pulses 10k terms/docs, 
@@ -82,7 +79,7 @@ public class Test10KPulsings extends Luc
     IndexReader ir = iw.getReader();
     iw.close();
 
-    TermsEnum te = MultiFields.getTerms(ir, "field").iterator();
+    TermsEnum te = MultiFields.getTerms(ir, "field").iterator(null);
     DocsEnum de = null;
     
     for (int i = 0; i < 10050; i++) {
@@ -140,7 +137,7 @@ public class Test10KPulsings extends Luc
     IndexReader ir = iw.getReader();
     iw.close();
 
-    TermsEnum te = MultiFields.getTerms(ir, "field").iterator();
+    TermsEnum te = MultiFields.getTerms(ir, "field").iterator(null);
     DocsEnum de = null;
     
     for (int i = 0; i < 10050; i++) {

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/TestPulsingReuse.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/TestPulsingReuse.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/TestPulsingReuse.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/index/codecs/pulsing/TestPulsingReuse.java Tue Nov 15 00:01:43 2011
@@ -57,7 +57,7 @@ public class TestPulsingReuse extends Lu
     IndexReader segment = ir.getSequentialSubReaders()[0];
     DocsEnum reuse = null;
     Map<DocsEnum,Boolean> allEnums = new IdentityHashMap<DocsEnum,Boolean>();
-    TermsEnum te = segment.terms("foo").iterator();
+    TermsEnum te = segment.terms("foo").iterator(null);
     while (te.next() != null) {
       reuse = te.docs(null, reuse);
       allEnums.put(reuse, true);
@@ -67,7 +67,7 @@ public class TestPulsingReuse extends Lu
     
     allEnums.clear();
     DocsAndPositionsEnum posReuse = null;
-    te = segment.terms("foo").iterator();
+    te = segment.terms("foo").iterator(null);
     while (te.next() != null) {
       posReuse = te.docsAndPositions(null, posReuse);
       allEnums.put(posReuse, true);
@@ -99,7 +99,7 @@ public class TestPulsingReuse extends Lu
     IndexReader segment = ir.getSequentialSubReaders()[0];
     DocsEnum reuse = null;
     Map<DocsEnum,Boolean> allEnums = new IdentityHashMap<DocsEnum,Boolean>();
-    TermsEnum te = segment.terms("foo").iterator();
+    TermsEnum te = segment.terms("foo").iterator(null);
     while (te.next() != null) {
       reuse = te.docs(null, reuse);
       allEnums.put(reuse, true);
@@ -109,7 +109,7 @@ public class TestPulsingReuse extends Lu
     
     allEnums.clear();
     DocsAndPositionsEnum posReuse = null;
-    te = segment.terms("foo").iterator();
+    te = segment.terms("foo").iterator(null);
     while (te.next() != null) {
       posReuse = te.docsAndPositions(null, posReuse);
       allEnums.put(posReuse, true);

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/FieldCacheRewriteMethod.java Tue Nov 15 00:01:43 2011
@@ -99,7 +99,7 @@ public final class FieldCacheRewriteMeth
         }
         
         @Override
-        public TermsEnum iterator() throws IOException {
+        public TermsEnum iterator(TermsEnum reuse) throws IOException {
           return fcsi.getTermsEnum();
         }
 
@@ -127,12 +127,10 @@ public final class FieldCacheRewriteMeth
       assert termsEnum != null;
       if (termsEnum.next() != null) {
         // fill into a OpenBitSet
-        int termCount = 0;
         do {
           long ord = termsEnum.ord();
           if (ord > 0) {
             termSet.set(ord);
-            termCount++;
           }
         } while (termsEnum.next() != null);
       } else {

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java Tue Nov 15 00:01:43 2011
@@ -80,7 +80,7 @@ public class TestMultiPhraseQuery extend
     
     // this TermEnum gives "piccadilly", "pie" and "pizza".
     String prefix = "pi";
-    TermsEnum te = MultiFields.getFields(reader).terms("body").iterator();
+    TermsEnum te = MultiFields.getFields(reader).terms("body").iterator(null);
     te.seekCeil(new BytesRef(prefix));
     do {
       String s = te.term().utf8ToString();
@@ -587,4 +587,3 @@ public class TestMultiPhraseQuery extend
   }
   
 }
-

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java Tue Nov 15 00:01:43 2011
@@ -157,7 +157,7 @@ public class TestMultiTermQueryRewrites 
     final MultiTermQuery mtq = new MultiTermQuery("data") {
       @Override
       protected TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException {
-        return new TermRangeTermsEnum(terms.iterator(), new BytesRef("2"), new BytesRef("7"), true, true) {
+        return new TermRangeTermsEnum(terms.iterator(null), new BytesRef("2"), new BytesRef("7"), true, true) {
           final BoostAttribute boostAtt =
             attributes().addAttribute(BoostAttribute.class);
         

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java Tue Nov 15 00:01:43 2011
@@ -173,7 +173,7 @@ class MultiThreadTermVectorsReader imple
       Terms vector = reader.getTermVectors(docId).terms("field");
       timeElapsed += System.currentTimeMillis()-start;
       
-      verifyVector(vector.iterator(), docId);
+      verifyVector(vector.iterator(null), docId);
     }
   }
   
@@ -182,7 +182,7 @@ class MultiThreadTermVectorsReader imple
     while(fieldsEnum.next() != null) {
       Terms terms = fieldsEnum.terms();
       assert terms != null;
-      verifyVector(terms.iterator(), num);
+      verifyVector(terms.iterator(null), num);
     }
   }
 

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPhrasePrefixQuery.java Tue Nov 15 00:01:43 2011
@@ -73,7 +73,7 @@ public class TestPhrasePrefixQuery exten
     
     // this TermEnum gives "piccadilly", "pie" and "pizza".
     String prefix = "pi";
-    TermsEnum te = MultiFields.getFields(reader).terms("body").iterator();
+    TermsEnum te = MultiFields.getFields(reader).terms("body").iterator(null);
     te.seekCeil(new BytesRef(prefix));
     do {
       String s = te.term().utf8ToString();

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestPrefixRandom.java Tue Nov 15 00:01:43 2011
@@ -90,7 +90,7 @@ public class TestPrefixRandom extends Lu
     
     @Override
     protected TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException {
-      return new SimplePrefixTermsEnum(terms.iterator(), prefix);
+      return new SimplePrefixTermsEnum(terms.iterator(null), prefix);
     }
 
     private class SimplePrefixTermsEnum extends FilteredTermsEnum {

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestRegexpRandom2.java Tue Nov 15 00:01:43 2011
@@ -113,7 +113,7 @@ public class TestRegexpRandom2 extends L
     
     @Override
     protected TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException {
-      return new SimpleAutomatonTermsEnum(terms.iterator());
+      return new SimpleAutomatonTermsEnum(terms.iterator(null));
     }
 
     private class SimpleAutomatonTermsEnum extends FilteredTermsEnum {

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestTermVectors.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestTermVectors.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestTermVectors.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/search/TestTermVectors.java Tue Nov 15 00:01:43 2011
@@ -130,7 +130,7 @@ public class TestTermVectors extends Luc
       DocsAndPositionsEnum dpEnum = null;
       Terms terms = fieldsEnum.terms();
       assertNotNull(terms);
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
       assertEquals("content", termsEnum.next().utf8ToString());
       dpEnum = termsEnum.docsAndPositions(null, dpEnum);
       assertTrue(dpEnum.nextDoc() != DocsEnum.NO_MORE_DOCS);
@@ -166,7 +166,7 @@ public class TestTermVectors extends Luc
       assertNotNull(vectors);
       assertEquals(1, vectors.getUniqueFieldCount());
       
-      TermsEnum termsEnum = vectors.terms("field").iterator();
+      TermsEnum termsEnum = vectors.terms("field").iterator(null);
       assertNotNull(termsEnum.next());
       dpEnum = termsEnum.docsAndPositions(null, dpEnum);
       OffsetAttribute offsetAtt = dpEnum == null ? null : dpEnum.attributes().getAttribute(OffsetAttribute.class);
@@ -265,7 +265,7 @@ public class TestTermVectors extends Luc
     while(fields.next() != null) {
       Terms terms = fields.terms();
       assertNotNull(terms);
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
 
       while (termsEnum.next() != null) {
         String text = termsEnum.term().utf8ToString();
@@ -284,7 +284,7 @@ public class TestTermVectors extends Luc
           //float coord = sim.coord()
           //System.out.println("TF: " + tf + " IDF: " + idf + " LenNorm: " + lNorm);
           assertNotNull(vector);
-          TermsEnum termsEnum2 = vector.iterator();
+          TermsEnum termsEnum2 = vector.iterator(null);
 
           while(termsEnum2.next() != null) {
             if (text.equals(termsEnum2.term().utf8ToString())) {
@@ -312,7 +312,7 @@ public class TestTermVectors extends Luc
     assertNotNull(vector);
     //System.out.println("Vector: " + vector);
     assertEquals(10, vector.getUniqueTermCount());
-    TermsEnum termsEnum = vector.iterator();
+    TermsEnum termsEnum = vector.iterator(null);
     while(termsEnum.next() != null) {
       String term = termsEnum.term().utf8ToString();
       //System.out.println("Term: " + term);
@@ -430,7 +430,7 @@ public class TestTermVectors extends Luc
     Terms vector = vectors.terms("field");
     assertNotNull(vector);
     assertEquals(1, vector.getUniqueTermCount());
-    TermsEnum termsEnum = vector.iterator();
+    TermsEnum termsEnum = vector.iterator(null);
     assertNotNull(termsEnum.next());
     assertEquals("one", termsEnum.term().utf8ToString());
     assertEquals(5, termsEnum.totalTermFreq());

Modified: lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/util/fst/TestFSTs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/util/fst/TestFSTs.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/util/fst/TestFSTs.java (original)
+++ lucene/dev/branches/lucene2621/lucene/src/test/org/apache/lucene/util/fst/TestFSTs.java Tue Nov 15 00:01:43 2011
@@ -1050,7 +1050,7 @@ public class TestFSTs extends LuceneTest
     }
     Terms terms = MultiFields.getTerms(r, "body");
     if (terms != null) {
-      final TermsEnum termsEnum = terms.iterator();
+      final TermsEnum termsEnum = terms.iterator(null);
       if (VERBOSE) {
         System.out.println("TEST: got termsEnum=" + termsEnum);
       }
@@ -1501,7 +1501,7 @@ public class TestFSTs extends LuceneTest
       }
 
       // Verify w/ MultiTermsEnum
-      final TermsEnum termsEnum = MultiFields.getTerms(r, "id").iterator();
+      final TermsEnum termsEnum = MultiFields.getTerms(r, "id").iterator(null);
       for(int iter=0;iter<2*NUM_IDS;iter++) {
         final String id;
         final String nextID;

Modified: lucene/dev/branches/lucene2621/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java (original)
+++ lucene/dev/branches/lucene2621/modules/analysis/common/src/java/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzer.java Tue Nov 15 00:01:43 2011
@@ -154,7 +154,7 @@ public final class QueryAutoStopWordAnal
       Terms terms = MultiFields.getTerms(indexReader, field);
       CharsRef spare = new CharsRef();
       if (terms != null) {
-        TermsEnum te = terms.iterator();
+        TermsEnum te = terms.iterator(null);
         BytesRef text;
         while ((text = te.next()) != null) {
           if (te.docFreq() > maxDocFreq) {

Modified: lucene/dev/branches/lucene2621/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java (original)
+++ lucene/dev/branches/lucene2621/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java Tue Nov 15 00:01:43 2011
@@ -32,7 +32,6 @@ import org.apache.lucene.document.FieldT
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.DocsAndPositionsEnum;
 import org.apache.lucene.index.DocsEnum;
-import org.apache.lucene.index.Fields;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.Terms;
@@ -108,7 +107,7 @@ public class TestTeeSinkTokenFilter exte
     IndexReader r = IndexReader.open(dir, true);
     Terms vector = r.getTermVectors(0).terms("field");
     assertEquals(1, vector.getUniqueTermCount());
-    TermsEnum termsEnum = vector.iterator();
+    TermsEnum termsEnum = vector.iterator(null);
     termsEnum.next();
     assertEquals(2, termsEnum.totalTermFreq());
     DocsAndPositionsEnum positions = termsEnum.docsAndPositions(null, null);

Modified: lucene/dev/branches/lucene2621/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java (original)
+++ lucene/dev/branches/lucene2621/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java Tue Nov 15 00:01:43 2011
@@ -91,7 +91,7 @@ public class QualityQueriesFinder {
       int threshold = ir.maxDoc() / 10; // ignore words too common.
       Terms terms = MultiFields.getTerms(ir, field);
       if (terms != null) {
-        TermsEnum termsEnum = terms.iterator();
+        TermsEnum termsEnum = terms.iterator(null);
         while (termsEnum.next() != null) {
           int df = termsEnum.docFreq();
           if (df<threshold) {

Modified: lucene/dev/branches/lucene2621/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java (original)
+++ lucene/dev/branches/lucene2621/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java Tue Nov 15 00:01:43 2011
@@ -490,7 +490,7 @@ public class TestPerfTasksLogic extends 
       if (terms == null) {
         continue;
       }
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
       DocsEnum docs = null;
       while(termsEnum.next() != null) {
         docs = termsEnum.docs(MultiFields.getLiveDocs(reader), docs);

Modified: lucene/dev/branches/lucene2621/modules/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java (original)
+++ lucene/dev/branches/lucene2621/modules/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java Tue Nov 15 00:01:43 2011
@@ -677,7 +677,7 @@ public class DirectoryTaxonomyWriter imp
     // executed we're safe, because we only iterate as long as there are next()
     // terms.
     if (terms != null) {
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
       Bits liveDocs = MultiFields.getLiveDocs(reader);
       DocsEnum docsEnum = null;
       while (termsEnum.next() != null) {
@@ -751,7 +751,7 @@ public class DirectoryTaxonomyWriter imp
     // TODO (Facet): can this then go segment-by-segment and avoid MultiDocsEnum etc?
     Terms terms = MultiFields.getTerms(mainreader, Consts.FULL);
     assert terms != null; // TODO (Facet): explicit check / throw exception?
-    TermsEnum mainte = terms.iterator();
+    TermsEnum mainte = terms.iterator(null);
     DocsEnum mainde = null;
 
     IndexReader[] otherreaders = new IndexReader[taxonomies.length];
@@ -761,7 +761,7 @@ public class DirectoryTaxonomyWriter imp
       otherreaders[i] = IndexReader.open(taxonomies[i]);
       terms = MultiFields.getTerms(otherreaders[i], Consts.FULL);
       assert terms != null; // TODO (Facet): explicit check / throw exception?
-      othertes[i] = terms.iterator();
+      othertes[i] = terms.iterator(null);
       // Also tell the ordinal maps their expected sizes:
       ordinalMaps[i].setSize(otherreaders[i].numDocs());
     }

Modified: lucene/dev/branches/lucene2621/modules/facet/src/test/org/apache/lucene/facet/FacetTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/facet/src/test/org/apache/lucene/facet/FacetTestBase.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/facet/src/test/org/apache/lucene/facet/FacetTestBase.java (original)
+++ lucene/dev/branches/lucene2621/modules/facet/src/test/org/apache/lucene/facet/FacetTestBase.java Tue Nov 15 00:01:43 2011
@@ -282,7 +282,7 @@ public abstract class FacetTestBase exte
         continue;
       }
       Bits liveDocs = MultiFields.getLiveDocs(indexReader);
-      TermsEnum te = terms.iterator();
+      TermsEnum te = terms.iterator(null);
       DocsEnum de = null;
       while (te.next() != null) {
         de = te.docs(liveDocs, de);

Modified: lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java (original)
+++ lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/TermsFilter.java Tue Nov 15 00:01:43 2011
@@ -74,7 +74,7 @@ public class TermsFilter extends Filter 
         if (termsC == null) {
           return result;
         }
-        termsEnum = termsC.iterator();
+        termsEnum = termsC.iterator(null);
         lastField = term.field();
       }
 

Modified: lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java (original)
+++ lucene/dev/branches/lucene2621/modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java Tue Nov 15 00:01:43 2011
@@ -736,7 +736,7 @@ public final class MoreLikeThis {
    * @param vector List of terms and their frequencies for a doc/field
    */
   private void addTermFrequencies(Map<String, Int> termFreqMap, Terms vector) throws IOException {
-    final TermsEnum termsEnum = vector.iterator();
+    final TermsEnum termsEnum = vector.iterator(null);
     final CharsRef spare = new CharsRef();
     BytesRef text;
     while((text = termsEnum.next()) != null) {

Modified: lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java (original)
+++ lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndPrefixQuery.java Tue Nov 15 00:01:43 2011
@@ -60,7 +60,7 @@ public class SrndPrefixQuery extends Sim
     /* inspired by PrefixQuery.rewrite(): */
     Terms terms = MultiFields.getTerms(reader, fieldName);
     if (terms != null) {
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
 
       boolean skip = false;
       TermsEnum.SeekStatus status = termsEnum.seekCeil(new BytesRef(getPrefix()));

Modified: lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java (original)
+++ lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTermQuery.java Tue Nov 15 00:01:43 2011
@@ -51,7 +51,7 @@ public class SrndTermQuery extends Simpl
     /* check term presence in index here for symmetry with other SimpleTerm's */
     Terms terms = MultiFields.getTerms(reader, fieldName);
     if (terms != null) {
-      TermsEnum termsEnum = terms.iterator();
+      TermsEnum termsEnum = terms.iterator(null);
 
       TermsEnum.SeekStatus status = termsEnum.seekCeil(new BytesRef(getTermText()));
       if (status == TermsEnum.SeekStatus.FOUND) {

Modified: lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTruncQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTruncQuery.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTruncQuery.java (original)
+++ lucene/dev/branches/lucene2621/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/SrndTruncQuery.java Tue Nov 15 00:01:43 2011
@@ -93,7 +93,7 @@ public class SrndTruncQuery extends Simp
     if (terms != null) {
       Matcher matcher = pattern.matcher("");
       try {
-        TermsEnum termsEnum = terms.iterator();
+        TermsEnum termsEnum = terms.iterator(null);
 
         TermsEnum.SeekStatus status = termsEnum.seekCeil(prefixRef);
         BytesRef text;

Modified: lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/HighFrequencyDictionary.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/HighFrequencyDictionary.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/HighFrequencyDictionary.java (original)
+++ lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/HighFrequencyDictionary.java Tue Nov 15 00:01:43 2011
@@ -24,7 +24,6 @@ import org.apache.lucene.index.IndexRead
 import org.apache.lucene.index.TermsEnum;
 import org.apache.lucene.index.Terms;
 import org.apache.lucene.index.MultiFields;
-import org.apache.lucene.search.spell.Dictionary;
 import org.apache.lucene.util.CharsRef;
 import org.apache.lucene.util.BytesRef;
 
@@ -64,7 +63,7 @@ public class HighFrequencyDictionary imp
       try {
         Terms terms = MultiFields.getTerms(reader, field);
         if (terms != null) {
-          termsEnum = terms.iterator();
+          termsEnum = terms.iterator(null);
         }
         minNumDocs = (int)(thresh * (float)reader.numDocs());
       } catch (IOException e) {

Modified: lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneDictionary.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneDictionary.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneDictionary.java (original)
+++ lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/LuceneDictionary.java Tue Nov 15 00:01:43 2011
@@ -62,7 +62,7 @@ public class LuceneDictionary implements
       try {
         final Terms terms = MultiFields.getTerms(reader, field);
         if (terms != null) {
-          termsEnum = terms.iterator();
+          termsEnum = terms.iterator(null);
           pendingTerm = termsEnum.next();
         }
       } catch (IOException e) {

Modified: lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java (original)
+++ lucene/dev/branches/lucene2621/modules/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java Tue Nov 15 00:01:43 2011
@@ -500,7 +500,7 @@ public class SpellChecker implements jav
           protected void add(int base, IndexReader r) throws IOException {
             Terms terms = r.terms(F_WORD);
             if (terms != null)
-              termsEnums.add(terms.iterator());
+              termsEnums.add(terms.iterator(null));
           }
         }.run();
       }

Modified: lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java (original)
+++ lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java Tue Nov 15 00:01:43 2011
@@ -269,7 +269,7 @@ public class LukeRequestHandler extends 
           Terms v = reader.getTermVector( docId, field.name() );
           if( v != null ) {
             SimpleOrderedMap<Integer> tfv = new SimpleOrderedMap<Integer>();
-            final TermsEnum termsEnum = v.iterator();
+            final TermsEnum termsEnum = v.iterator(null);
             BytesRef text;
             while((text = termsEnum.next()) != null) {
               final int freq = (int) termsEnum.totalTermFreq();
@@ -487,7 +487,7 @@ public class LukeRequestHandler extends 
         while(fieldsEnum.next() != null) {
           Terms terms = fieldsEnum.terms();
           if (terms != null) {
-            TermsEnum termsEnum = terms.iterator();
+            TermsEnum termsEnum = terms.iterator(null);
             while(termsEnum.next() != null) {
               numTerms++;
             }
@@ -646,7 +646,7 @@ public class LukeRequestHandler extends 
         if (terms == null) {
           continue;
         }
-        TermsEnum termsEnum = terms.iterator();
+        TermsEnum termsEnum = terms.iterator(null);
         BytesRef text;
         while((text = termsEnum.next()) != null) {
           String t = text.utf8ToChars(spare).toString();

Modified: lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java (original)
+++ lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermVectorComponent.java Tue Nov 15 00:01:43 2011
@@ -226,6 +226,8 @@ public class TermVectorComponent extends
       }
     };
 
+    TermsEnum termsEnum = null;
+
     while (iter.hasNext()) {
       Integer docId = iter.next();
       NamedList<Object> docNL = new NamedList<Object>();
@@ -246,7 +248,8 @@ public class TermVectorComponent extends
           final String field = entry.getKey();
           final Terms vector = reader.getTermVector(docId, field);
           if (vector != null) {
-            mapOneVector(docNL, entry.getValue(), reader, docId, vector.iterator(), field);
+            termsEnum = vector.iterator(termsEnum);
+            mapOneVector(docNL, entry.getValue(), reader, docId, vector.iterator(termsEnum), field);
           }
         }
       } else {
@@ -257,7 +260,8 @@ public class TermVectorComponent extends
         while((field = fieldsEnum.next()) != null) {
           Terms terms = fieldsEnum.terms();
           if (terms != null) {
-            mapOneVector(docNL, allFields, reader, docId, terms.iterator(), field);
+            termsEnum = terms.iterator(termsEnum);
+            mapOneVector(docNL, allFields, reader, docId, termsEnum, field);
           }
         }
       }
@@ -390,7 +394,7 @@ public class TermVectorComponent extends
     try {
       Terms terms = MultiFields.getTerms(reader, field);
       if (terms != null) {
-        TermsEnum termsEnum = terms.iterator();
+        TermsEnum termsEnum = terms.iterator(null);
         if (termsEnum.seekExact(term, true)) {
           result = termsEnum.docFreq();
         }

Modified: lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java (original)
+++ lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/handler/component/TermsComponent.java Tue Nov 15 00:01:43 2011
@@ -158,7 +158,7 @@ public class TermsComponent extends Sear
       }
 
 
-     TermsEnum termsEnum = terms.iterator();
+     TermsEnum termsEnum = terms.iterator(null);
      BytesRef term = null;
 
       if (lowerBytes != null) {

Modified: lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/request/SimpleFacets.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/request/SimpleFacets.java (original)
+++ lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/request/SimpleFacets.java Tue Nov 15 00:01:43 2011
@@ -633,7 +633,7 @@ public class SimpleFacets {
     SolrIndexSearcher.DocsEnumState deState = null;
     BytesRef term = null;
     if (terms != null) {
-      termsEnum = terms.iterator();
+      termsEnum = terms.iterator(null);
 
       // TODO: OPT: if seek(ord) is supported for this termsEnum, then we could use it for
       // facet.offset when sorting by index order.

Modified: lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java (original)
+++ lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java Tue Nov 15 00:01:43 2011
@@ -270,8 +270,8 @@ class JoinQuery extends Query {
       BytesRef prefix = prefixStr == null ? null : new BytesRef(prefixStr);
 
       BytesRef term = null;
-      TermsEnum  termsEnum = terms.iterator();
-      TermsEnum  toTermsEnum = toTerms.iterator();
+      TermsEnum  termsEnum = terms.iterator(null);
+      TermsEnum  toTermsEnum = toTerms.iterator(null);
       SolrIndexSearcher.DocsEnumState fromDeState = null;
       SolrIndexSearcher.DocsEnumState toDeState = null;
 

Modified: lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java?rev=1201968&r1=1201967&r2=1201968&view=diff
==============================================================================
--- lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java (original)
+++ lucene/dev/branches/lucene2621/solr/core/src/java/org/apache/solr/search/function/FileFloatSource.java Tue Nov 15 00:01:43 2011
@@ -241,7 +241,7 @@ public class FileFloatSource extends Val
     BytesRef internalKey = new BytesRef();
 
     try {
-      TermsEnum termsEnum = MultiFields.getTerms(reader, idName).iterator();
+      TermsEnum termsEnum = MultiFields.getTerms(reader, idName).iterator(null);
       DocsEnum docsEnum = null;
 
       // removing deleted docs shouldn't matter



Mime
View raw message