lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r825024 - in /lucene/java/branches/lucene_2_9_back_compat_tests/src: java/org/apache/lucene/index/ test/org/apache/lucene/index/
Date Wed, 14 Oct 2009 06:39:35 GMT
Author: buschmi
Date: Wed Oct 14 06:39:34 2009
New Revision: 825024

URL: http://svn.apache.org/viewvc?rev=825024&view=rev
Log:
LUCENE-1979: Remove remaining deprecations from index package.

Modified:
    lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/IndexReader.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDoc.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiReader.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestPayloads.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentMerger.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentReader.java
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestTermVectorsReader.java

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/IndexReader.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/IndexReader.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/IndexReader.java
Wed Oct 14 06:39:34 2009
@@ -1460,8 +1460,7 @@
     return null;
   }
 
-  /** Expert    
-   *  @deprecated */
+  /** Expert */
   public Object getFieldCacheKey() {
     return this;
   }

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/java/org/apache/lucene/index/SnapshotDeletionPolicy.java
Wed Oct 14 06:39:34 2009
@@ -71,8 +71,7 @@
    *  you call optimize()) then in the worst case this could
    *  consume an extra 1X of your total index size, until
    *  you release the snapshot. */
-  // TODO 3.0: change this to return IndexCommit instead
-  public synchronized IndexCommitPoint snapshot() {
+  public synchronized IndexCommit snapshot() {
     if (snapshot == null)
       snapshot = lastCommit.getSegmentsFileName();
     else

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/DocHelper.java
Wed Oct 14 06:39:34 2009
@@ -238,7 +238,7 @@
     writer.setSimilarity(similarity);
     //writer.setUseCompoundFile(false);
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
     return info;

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
Wed Oct 14 06:39:34 2009
@@ -87,7 +87,7 @@
         writer.addDocument(doc);
         failure.setDoFail();
         try {
-          writer.flush();
+          writer.flush(true, false, true);
           if (failure.hitExc) {
             fail("failed to hit IOException");
           }
@@ -139,7 +139,7 @@
         delID += 10;
       }
 
-      writer.flush();
+      writer.commit();
     }
 
     writer.close();
@@ -209,7 +209,7 @@
       // stress out aborting them on close:
       writer.setMergeFactor(3);
       writer.addDocument(doc);
-      writer.flush();
+      writer.commit();
 
       writer.close(false);
 

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDoc.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDoc.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDoc.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDoc.java
Wed Oct 14 06:39:34 2009
@@ -172,15 +172,15 @@
       Document doc = new Document();
       doc.add(new Field("contents", new FileReader(file)));
       writer.addDocument(doc);
-      writer.flush();
+      writer.commit();
       return writer.newestSegment();
    }
 
 
    private SegmentInfo merge(SegmentInfo si1, SegmentInfo si2, String merged, boolean useCompoundFile)
    throws Exception {
-      SegmentReader r1 = SegmentReader.get(si1);
-      SegmentReader r2 = SegmentReader.get(si2);
+      SegmentReader r1 = SegmentReader.get(true, si1, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
+      SegmentReader r2 = SegmentReader.get(true, si2, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
       SegmentMerger merger = new SegmentMerger(si1.dir, merged);
 
@@ -201,7 +201,7 @@
 
    private void printSegment(PrintWriter out, SegmentInfo si)
    throws Exception {
-      SegmentReader reader = SegmentReader.get(si);
+      SegmentReader reader = SegmentReader.get(true, si, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
       for (int i = 0; i < reader.numDocs(); i++)
         out.println(reader.document(i));

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestDocumentWriter.java
Wed Oct 14 06:39:34 2009
@@ -63,11 +63,11 @@
     Analyzer analyzer = new WhitespaceAnalyzer();
     IndexWriter writer = new IndexWriter(dir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
     writer.addDocument(testDoc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
     //After adding the document, we should be able to read it back in
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
     assertTrue(reader != null);
     Document doc = reader.document(0);
     assertTrue(doc != null);
@@ -123,10 +123,10 @@
     doc.add(new Field("repeated", "repeated two", Field.Store.YES, Field.Index.ANALYZED));
 
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
     TermPositions termPositions = reader.termPositions(new Term("repeated", "repeated"));
     assertTrue(termPositions.next());
@@ -183,10 +183,10 @@
     doc.add(new Field("f1", "a 5 a a", Field.Store.YES, Field.Index.ANALYZED));
 
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
     TermPositions termPositions = reader.termPositions(new Term("f1", "a"));
     assertTrue(termPositions.next());
@@ -223,10 +223,10 @@
     }, TermVector.NO));
     
     writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     SegmentInfo info = writer.newestSegment();
     writer.close();
-    SegmentReader reader = SegmentReader.get(info);
+    SegmentReader reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
 
     TermPositions termPositions = reader.termPositions(new Term("preanalyzed", "term1"));
     assertTrue(termPositions.next());

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
Wed Oct 14 06:39:34 2009
@@ -935,7 +935,7 @@
     for (int i = 0; i < 100; i++) {
       w.addDocument(createDocument(i, 4));
       if (multiSegment && (i % 10) == 0) {
-        w.flush();
+        w.commit();
       }
     }
     

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriter.java
Wed Oct 14 06:39:34 2009
@@ -1139,7 +1139,7 @@
     public void testIndexNoDocuments() throws IOException {
       RAMDirectory dir = new RAMDirectory();      
       IndexWriter writer  = new IndexWriter(dir, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
-      writer.flush();
+      writer.commit();
       writer.close();
 
       IndexReader reader = IndexReader.open(dir, true);
@@ -1148,7 +1148,7 @@
       reader.close();
 
       writer  = new IndexWriter(dir, new WhitespaceAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
-      writer.flush();
+      writer.commit();
       writer.close();
 
       reader = IndexReader.open(dir, true);
@@ -1509,7 +1509,7 @@
       Document doc = new Document();
       doc.add(new Field("field", "aaa", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
       writer.addDocument(doc);
-      writer.flush();
+      writer.commit();
       writer.addDocument(new Document());
       writer.close();
       _TestUtil.checkIndex(dir);
@@ -1601,13 +1601,13 @@
                            Field.TermVector.NO));
     iw.addDocument(document);
     // Make first segment
-    iw.flush();
+    iw.commit();
 
     document.add(new Field("tvtest", "a b c", Field.Store.NO, Field.Index.ANALYZED,
         Field.TermVector.YES));
     iw.addDocument(document);
     // Make 2nd segment
-    iw.flush();
+    iw.commit();
 
     iw.optimize();
     iw.close();
@@ -1622,14 +1622,14 @@
     document.add(new Field("tvtest", "a b c", Field.Store.NO, Field.Index.ANALYZED,
         Field.TermVector.YES));
     iw.addDocument(document);
-    iw.flush();
+    iw.commit();
 
     document = new Document();
     document.add(new Field("tvtest", "x y z", Field.Store.NO, Field.Index.ANALYZED,
                            Field.TermVector.NO));
     iw.addDocument(document);
     // Make first segment
-    iw.flush();
+    iw.commit();
 
     iw.optimize();
 
@@ -1637,7 +1637,7 @@
         Field.TermVector.YES));
     iw.addDocument(document);
     // Make 2nd segment
-    iw.flush();
+    iw.commit();
     iw.optimize();
 
     iw.close();

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterDelete.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
Wed Oct 14 06:39:34 2009
@@ -153,7 +153,7 @@
 
       addDoc(modifier, ++id, value);
       assertEquals(0, modifier.getSegmentCount());
-      modifier.flush();
+      modifier.commit();
 
       modifier.commit();
 

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
Wed Oct 14 06:39:34 2009
@@ -52,7 +52,7 @@
       d1.add(new Field(term.field(), term.text(), Store.NO, Index.ANALYZED));
       writer.addDocument(d1);
     }
-    writer.flush();
+    writer.commit();
     writer.optimize();
     writer.close();
 

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiReader.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiReader.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestMultiReader.java
Wed Oct 14 06:39:34 2009
@@ -28,8 +28,8 @@
     IndexReader reader;
 
     sis.read(dir);
-    SegmentReader reader1 = SegmentReader.get(sis.info(0));
-    SegmentReader reader2 = SegmentReader.get(sis.info(1));
+    SegmentReader reader1 = SegmentReader.get(false, sis.info(0), IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
+    SegmentReader reader2 = SegmentReader.get(false, sis.info(1), IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
     readers[0] = reader1;
     readers[1] = reader2;
     assertTrue(reader1 != null);

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestPayloads.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestPayloads.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestPayloads.java
Wed Oct 14 06:39:34 2009
@@ -202,7 +202,7 @@
         }
         
         // make sure we create more than one segment to test merging
-        writer.flush();
+        writer.commit();
         
         // now we make sure to have different payload lengths next at the next skip point
       
         for (int i = 0; i < numDocs; i++) {

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentMerger.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentMerger.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentMerger.java
Wed Oct 14 06:39:34 2009
@@ -49,8 +49,8 @@
     SegmentInfo info1 = DocHelper.writeDoc(merge1Dir, doc1);
     DocHelper.setupDoc(doc2);
     SegmentInfo info2 = DocHelper.writeDoc(merge2Dir, doc2);
-    reader1 = SegmentReader.get(info1);
-    reader2 = SegmentReader.get(info2);
+    reader1 = SegmentReader.get(true, info1, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
+    reader2 = SegmentReader.get(true, info2, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
   }
 
   public void test() {
@@ -69,7 +69,7 @@
     merger.closeReaders();
     assertTrue(docsMerged == 2);
     //Should be able to open a new SegmentReader against the new directory
-    SegmentReader mergedReader = SegmentReader.get(new SegmentInfo(mergedSegment, docsMerged,
mergedDir, false, true));
+    SegmentReader mergedReader = SegmentReader.get(true, new SegmentInfo(mergedSegment, docsMerged,
mergedDir, false, true), IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
     assertTrue(mergedReader != null);
     assertTrue(mergedReader.numDocs() == 2);
     Document newDoc1 = mergedReader.document(0);

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentReader.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentReader.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestSegmentReader.java
Wed Oct 14 06:39:34 2009
@@ -43,7 +43,7 @@
     super.setUp();
     DocHelper.setupDoc(testDoc);
     SegmentInfo info = DocHelper.writeDoc(dir, testDoc);
-    reader = SegmentReader.get(info);
+    reader = SegmentReader.get(true, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
   }
 
   public void test() {
@@ -73,7 +73,7 @@
     Document docToDelete = new Document();
     DocHelper.setupDoc(docToDelete);
     SegmentInfo info = DocHelper.writeDoc(dir, docToDelete);
-    SegmentReader deleteReader = SegmentReader.get(info);
+    SegmentReader deleteReader = SegmentReader.get(false, info, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR);
     assertTrue(deleteReader != null);
     assertTrue(deleteReader.numDocs() == 1);
     deleteReader.deleteDocument(0);
@@ -167,14 +167,7 @@
           // test for fake norms of 1.0 or null depending on the flag
           byte [] norms = reader.norms(f.name());
           byte norm1 = DefaultSimilarity.encodeNorm(1.0f);
-          if (reader.getDisableFakeNorms())
-            assertNull(norms);
-          else {
-            assertEquals(norms.length,reader.maxDoc());
-            for (int j=0; j<reader.maxDoc(); j++) {
-              assertEquals(norms[j], norm1);
-            }
-          }
+          assertNull(norms);
           norms = new byte[reader.maxDoc()];
           reader.norms(f.name(),norms, 0);
           for (int j=0; j<reader.maxDoc(); j++) {

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestTermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestTermVectorsReader.java?rev=825024&r1=825023&r2=825024&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestTermVectorsReader.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/index/TestTermVectorsReader.java
Wed Oct 14 06:39:34 2009
@@ -111,7 +111,7 @@
     //terms
     for(int j=0;j<5;j++)
       writer.addDocument(doc);
-    writer.flush();
+    writer.commit();
     seg = writer.newestSegment().name;
     writer.close();
 



Mime
View raw message