lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1210305 [2/2] - in /lucene/dev/branches/lucene3606: lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/ lucene/contrib/highlighter/src/test/org/apache/lucene/search/highlight/ lucene/contrib/highlighter/src/test/o...
Date Mon, 05 Dec 2011 01:41:40 GMT
Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java Mon Dec  5 01:41:38 2011
@@ -254,7 +254,7 @@ public class TestIndexWriterExceptions e
     }
 
     // Confirm that when doc hits exception partway through tokenization, it's deleted:
-    IndexReader r2 = IndexReader.open(dir, true);
+    IndexReader r2 = IndexReader.open(dir);
     final int count = r2.docFreq(new Term("content4", "aaa"));
     final int count2 = r2.docFreq(new Term("content4", "ddd"));
     assertEquals(count, count2);
@@ -300,7 +300,7 @@ public class TestIndexWriterExceptions e
     }
 
     // Confirm that when doc hits exception partway through tokenization, it's deleted:
-    IndexReader r2 = IndexReader.open(dir, true);
+    IndexReader r2 = IndexReader.open(dir);
     final int count = r2.docFreq(new Term("content4", "aaa"));
     final int count2 = r2.docFreq(new Term("content4", "ddd"));
     assertEquals(count, count2);
@@ -494,7 +494,7 @@ public class TestIndexWriterExceptions e
     writer.addDocument(doc);
 
     writer.close();
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     final Term t = new Term("content", "aa");
     assertEquals(3, reader.docFreq(t));
 
@@ -576,7 +576,7 @@ public class TestIndexWriterExceptions e
     }
     assertTrue(hitError);
     writer.close();
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     assertEquals(198, reader.docFreq(new Term("content", "aa")));
     reader.close();
     dir.close();
@@ -631,7 +631,7 @@ public class TestIndexWriterExceptions e
       if (VERBOSE) {
         System.out.println("TEST: open reader");
       }
-      IndexReader reader = IndexReader.open(dir, true);
+      IndexReader reader = IndexReader.open(dir);
       if (i == 0) { 
         int expected = 5;
         assertEquals(expected, reader.docFreq(new Term("contents", "here")));
@@ -660,7 +660,7 @@ public class TestIndexWriterExceptions e
       writer.forceMerge(1);
       writer.close();
 
-      reader = IndexReader.open(dir, true);
+      reader = IndexReader.open(dir);
       int expected = 19+(1-i)*2;
       assertEquals(expected, reader.docFreq(new Term("contents", "here")));
       assertEquals(expected, reader.maxDoc());
@@ -746,7 +746,7 @@ public class TestIndexWriterExceptions e
         writer.close();
       }
 
-      IndexReader reader = IndexReader.open(dir, true);
+      IndexReader reader = IndexReader.open(dir);
       int expected = (3+(1-i)*2)*NUM_THREAD*NUM_ITER;
       assertEquals("i=" + i, expected, reader.docFreq(new Term("contents", "here")));
       assertEquals(expected, reader.maxDoc());
@@ -774,7 +774,7 @@ public class TestIndexWriterExceptions e
       writer.forceMerge(1);
       writer.close();
 
-      reader = IndexReader.open(dir, true);
+      reader = IndexReader.open(dir);
       expected += 17-NUM_THREAD*NUM_ITER;
       assertEquals(expected, reader.docFreq(new Term("contents", "here")));
       assertEquals(expected, reader.maxDoc());
@@ -845,7 +845,7 @@ public class TestIndexWriterExceptions e
     failure.clearDoFail();
     writer.close();
 
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     assertEquals(23, reader.numDocs());
     reader.close();
     dir.close();
@@ -1058,7 +1058,7 @@ public class TestIndexWriterExceptions e
 
     IndexReader reader = null;
     try {
-      reader = IndexReader.open(dir, true);
+      reader = IndexReader.open(dir);
     } catch (IOException e) {
       e.printStackTrace(System.out);
       fail("segmentInfos failed to retry fallback to correct segments_N file");
@@ -1105,7 +1105,7 @@ public class TestIndexWriterExceptions e
 
       IndexReader reader = null;
       try {
-        reader = IndexReader.open(dir, true);
+        reader = IndexReader.open(dir);
         fail("reader did not hit IOException on opening a corrupt index");
       } catch (Exception e) {
       }
@@ -1154,7 +1154,7 @@ public class TestIndexWriterExceptions e
 
       IndexReader reader = null;
       try {
-        reader = IndexReader.open(dir, true);
+        reader = IndexReader.open(dir);
         fail("reader did not hit IOException on opening a corrupt index");
       } catch (Exception e) {
       }
@@ -1205,7 +1205,7 @@ public class TestIndexWriterExceptions e
 
       IndexReader reader = null;
       try {
-        reader = IndexReader.open(dir, true);
+        reader = IndexReader.open(dir);
       } catch (Exception e) {
         fail("reader failed to open on a crashed index");
       }

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterForceMerge.java Mon Dec  5 01:41:38 2011
@@ -186,7 +186,7 @@ public class TestIndexWriterForceMerge e
 
       if (0 == pass) {
         writer.close();
-        IndexReader reader = IndexReader.open(dir, true);
+        IndexReader reader = IndexReader.open(dir);
         assertEquals(1, reader.getSequentialSubReaders().length);
         reader.close();
       } else {
@@ -196,7 +196,7 @@ public class TestIndexWriterForceMerge e
         writer.addDocument(doc);
         writer.close();
 
-        IndexReader reader = IndexReader.open(dir, true);
+        IndexReader reader = IndexReader.open(dir);
         assertTrue(reader.getSequentialSubReaders().length > 1);
         reader.close();
 

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterMerging.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterMerging.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterMerging.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterMerging.java Mon Dec  5 01:41:38 2011
@@ -78,7 +78,7 @@ public class TestIndexWriterMerging exte
   private boolean verifyIndex(Directory directory, int startAt) throws IOException
   {
     boolean fail = false;
-    IndexReader reader = IndexReader.open(directory, true);
+    IndexReader reader = IndexReader.open(directory);
 
     int max = reader.maxDoc();
     for (int i = 0; i < max; i++)
@@ -144,7 +144,7 @@ public class TestIndexWriterMerging exte
       writer.addDocument(document);
     writer.close();
 
-    IndexReader ir = IndexReader.open(dir, false);
+    IndexReader ir = IndexReader.open(dir);
     assertEquals(10, ir.maxDoc());
     assertEquals(10, ir.numDocs());
     ir.deleteDocument(0);
@@ -158,7 +158,7 @@ public class TestIndexWriterMerging exte
     writer.forceMergeDeletes();
     assertEquals(8, writer.numDocs());
     writer.close();
-    ir = IndexReader.open(dir, true);
+    ir = IndexReader.open(dir);
     assertEquals(8, ir.maxDoc());
     assertEquals(8, ir.numDocs());
     ir.close();
@@ -195,7 +195,7 @@ public class TestIndexWriterMerging exte
       writer.addDocument(document);
     writer.close();
 
-    IndexReader ir = IndexReader.open(dir, false);
+    IndexReader ir = IndexReader.open(dir);
     assertEquals(98, ir.maxDoc());
     assertEquals(98, ir.numDocs());
     for(int i=0;i<98;i+=2)
@@ -211,7 +211,7 @@ public class TestIndexWriterMerging exte
     assertEquals(49, writer.numDocs());
     writer.forceMergeDeletes();
     writer.close();
-    ir = IndexReader.open(dir, true);
+    ir = IndexReader.open(dir);
     assertEquals(49, ir.maxDoc());
     assertEquals(49, ir.numDocs());
     ir.close();
@@ -248,7 +248,7 @@ public class TestIndexWriterMerging exte
       writer.addDocument(document);
     writer.close();
 
-    IndexReader ir = IndexReader.open(dir, false);
+    IndexReader ir = IndexReader.open(dir);
     assertEquals(98, ir.maxDoc());
     assertEquals(98, ir.numDocs());
     for(int i=0;i<98;i+=2)
@@ -263,7 +263,7 @@ public class TestIndexWriterMerging exte
     );
     writer.forceMergeDeletes(false);
     writer.close();
-    ir = IndexReader.open(dir, true);
+    ir = IndexReader.open(dir);
     assertEquals(49, ir.maxDoc());
     assertEquals(49, ir.numDocs());
     ir.close();

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java Mon Dec  5 01:41:38 2011
@@ -113,7 +113,7 @@ public class TestIndexWriterOnDiskFull e
             assertNoUnreferencedFiles(dir, "after disk full during addDocument");
             
             // Make sure reader can open the index:
-            IndexReader.open(dir, true).close();
+            IndexReader.open(dir).close();
           }
             
           dir.close();
@@ -189,7 +189,7 @@ public class TestIndexWriterOnDiskFull e
     
     // Make sure starting index seems to be working properly:
     Term searchTerm = new Term("content", "aaa");        
-    IndexReader reader = IndexReader.open(startDir, true);
+    IndexReader reader = IndexReader.open(startDir);
     assertEquals("first docFreq", 57, reader.docFreq(searchTerm));
     
     IndexSearcher searcher = newSearcher(reader);
@@ -306,7 +306,7 @@ public class TestIndexWriterOnDiskFull e
             } else if (1 == method) {
               IndexReader readers[] = new IndexReader[dirs.length];
               for(int i=0;i<dirs.length;i++) {
-                readers[i] = IndexReader.open(dirs[i], true);
+                readers[i] = IndexReader.open(dirs[i]);
               }
               try {
                 writer.addIndexes(readers);
@@ -355,7 +355,7 @@ public class TestIndexWriterOnDiskFull e
           // failed, we see either all docs or no docs added
           // (transactional semantics):
           try {
-            reader = IndexReader.open(dir, true);
+            reader = IndexReader.open(dir);
           } catch (IOException e) {
             e.printStackTrace(System.out);
             fail(testName + ": exception when creating IndexReader: " + e);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterReader.java Mon Dec  5 01:41:38 2011
@@ -159,7 +159,7 @@ public class TestIndexWriterReader exten
     writer.close();
     assertTrue(r2.isCurrent());
     
-    IndexReader r3 = IndexReader.open(dir1, true);
+    IndexReader r3 = IndexReader.open(dir1);
     assertTrue(r3.isCurrent());
     assertTrue(r2.isCurrent());
     assertEquals(0, count(new Term("id", id10), r3));
@@ -384,7 +384,7 @@ public class TestIndexWriterReader exten
 
     _TestUtil.checkIndex(mainDir);
 
-    IndexReader reader = IndexReader.open(mainDir, true);
+    IndexReader reader = IndexReader.open(mainDir);
     assertEquals(addDirThreads.count.intValue(), reader.numDocs());
     //assertEquals(100 + numDirs * (3 * numIter / 4) * addDirThreads.numThreads
     //    * addDirThreads.NUM_INIT_DOCS, reader.numDocs());
@@ -420,7 +420,7 @@ public class TestIndexWriterReader exten
       
       readers = new IndexReader[numDirs];
       for (int i = 0; i < numDirs; i++)
-        readers[i] = IndexReader.open(addDir, false);
+        readers[i] = IndexReader.open(addDir);
     }
     
     void joinThreads() {
@@ -892,7 +892,7 @@ public class TestIndexWriterReader exten
     w.forceMergeDeletes();
     w.close();
     r.close();
-    r = IndexReader.open(dir, true);
+    r = IndexReader.open(dir);
     assertEquals(1, r.numDocs());
     assertFalse(r.hasDeletions());
     r.close();

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java Mon Dec  5 01:41:38 2011
@@ -260,7 +260,7 @@ public class TestIndexWriterUnicode exte
     w.addDocument(doc);
     w.close();
 
-    IndexReader ir = IndexReader.open(dir, true);
+    IndexReader ir = IndexReader.open(dir);
     Document doc2 = ir.document(0);
     for(int i=0;i<count;i++) {
       assertEquals("field " + i + " was not indexed correctly", 1, ir.docFreq(new Term("f"+i, utf8Data[2*i+1])));

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java Mon Dec  5 01:41:38 2011
@@ -209,7 +209,7 @@ public class TestIndexWriterWithThreads 
       }
 
       // Quick test to make sure index is not corrupt:
-      IndexReader reader = IndexReader.open(dir, true);
+      IndexReader reader = IndexReader.open(dir);
       DocsEnum tdocs = _TestUtil.docs(random, reader,
                                       "field",
                                       new BytesRef("aaa"),
@@ -276,7 +276,7 @@ public class TestIndexWriterWithThreads 
       }
 
       if (success) {
-        IndexReader reader = IndexReader.open(dir, true);
+        IndexReader reader = IndexReader.open(dir);
         final Bits delDocs = MultiFields.getLiveDocs(reader);
         for(int j=0;j<reader.maxDoc();j++) {
           if (delDocs == null || !delDocs.get(j)) {
@@ -447,7 +447,7 @@ public class TestIndexWriterWithThreads 
      assertFalse("Failed due to: " + thread1.failure, thread1.failed);
      assertFalse("Failed due to: " + thread2.failure, thread2.failed);
      // now verify that we have two documents in the index
-     IndexReader reader = IndexReader.open(dir, true);
+     IndexReader reader = IndexReader.open(dir);
      assertEquals("IndexReader should have one document per thread running", 2,
          reader.numDocs());
      

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestLazyProxSkipping.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestLazyProxSkipping.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestLazyProxSkipping.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestLazyProxSkipping.java Mon Dec  5 01:41:38 2011
@@ -105,7 +105,7 @@ public class TestLazyProxSkipping extend
         writer.forceMerge(1);
         writer.close();
 
-      SegmentReader reader = getOnlySegmentReader(IndexReader.open(directory, false));
+      SegmentReader reader = getOnlySegmentReader(IndexReader.open(directory));
 
       this.searcher = newSearcher(reader);
     }
@@ -153,7 +153,7 @@ public class TestLazyProxSkipping extend
         }
         
         writer.close();
-        IndexReader reader = IndexReader.open(directory, true);
+        IndexReader reader = IndexReader.open(directory);
 
         DocsAndPositionsEnum tp = MultiFields.getTermPositionsEnum(reader,
                                                                    MultiFields.getLiveDocs(reader),

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitNorms.java Mon Dec  5 01:41:38 2011
@@ -66,7 +66,7 @@ public class TestOmitNorms extends Lucen
     // flush
     writer.close();
 
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
     FieldInfos fi = reader.fieldInfos();
     assertTrue("OmitNorms field bit should be set.", fi.fieldInfo("f1").omitNorms);
     assertTrue("OmitNorms field bit should be set.", fi.fieldInfo("f2").omitNorms);
@@ -120,7 +120,7 @@ public class TestOmitNorms extends Lucen
     // flush
     writer.close();
 
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
     FieldInfos fi = reader.fieldInfos();
     assertTrue("OmitNorms field bit should be set.", fi.fieldInfo("f1").omitNorms);
     assertTrue("OmitNorms field bit should be set.", fi.fieldInfo("f2").omitNorms);
@@ -168,7 +168,7 @@ public class TestOmitNorms extends Lucen
     // flush
     writer.close();
 
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
     FieldInfos fi = reader.fieldInfos();
     assertTrue("OmitNorms field bit should not be set.", !fi.fieldInfo("f1").omitNorms);
     assertTrue("OmitNorms field bit should be set.", fi.fieldInfo("f2").omitNorms);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitPositions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitPositions.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitPositions.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitPositions.java Mon Dec  5 01:41:38 2011
@@ -153,7 +153,7 @@ public class TestOmitPositions extends L
     // flush
     writer.close();
 
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
     FieldInfos fi = reader.fieldInfos();
     // docs + docs = docs
     assertEquals(IndexOptions.DOCS_ONLY, fi.fieldInfo("f1").indexOptions);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitTf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitTf.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitTf.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestOmitTf.java Mon Dec  5 01:41:38 2011
@@ -100,7 +100,7 @@ public class TestOmitTf extends LuceneTe
     // flush
     writer.close();
 
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
     FieldInfos fi = reader.fieldInfos();
     assertEquals("OmitTermFreqAndPositions field bit should be set.", IndexOptions.DOCS_ONLY, fi.fieldInfo("f1").indexOptions);
     assertEquals("OmitTermFreqAndPositions field bit should be set.", IndexOptions.DOCS_ONLY, fi.fieldInfo("f2").indexOptions);
@@ -152,7 +152,7 @@ public class TestOmitTf extends LuceneTe
     // flush
     writer.close();
 
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
     FieldInfos fi = reader.fieldInfos();
     assertEquals("OmitTermFreqAndPositions field bit should be set.", IndexOptions.DOCS_ONLY, fi.fieldInfo("f1").indexOptions);
     assertEquals("OmitTermFreqAndPositions field bit should be set.", IndexOptions.DOCS_ONLY, fi.fieldInfo("f2").indexOptions);
@@ -195,7 +195,7 @@ public class TestOmitTf extends LuceneTe
     // flush
     writer.close();
 
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
     FieldInfos fi = reader.fieldInfos();
     assertEquals("OmitTermFreqAndPositions field bit should not be set.", IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, fi.fieldInfo("f1").indexOptions);
     assertEquals("OmitTermFreqAndPositions field bit should be set.", IndexOptions.DOCS_ONLY, fi.fieldInfo("f2").indexOptions);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReader.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReader.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReader.java Mon Dec  5 01:41:38 2011
@@ -75,8 +75,8 @@ public class TestParallelReader extends 
     Directory dir1 = getDir1(random);
     Directory dir2 = getDir2(random);
     ParallelReader pr = new ParallelReader();
-    pr.add(IndexReader.open(dir1, false));
-    pr.add(IndexReader.open(dir2, false));
+    pr.add(IndexReader.open(dir1));
+    pr.add(IndexReader.open(dir2));
     Collection<String> fieldNames = pr.getFieldNames(IndexReader.FieldOption.ALL);
     assertEquals(4, fieldNames.size());
     assertTrue(fieldNames.contains("f1"));
@@ -102,8 +102,8 @@ public class TestParallelReader extends 
     w2.close();
     
     ParallelReader pr = new ParallelReader();
-    pr.add(IndexReader.open(dir1, false));
-    IndexReader ir = IndexReader.open(dir2, false);
+    pr.add(IndexReader.open(dir1));
+    IndexReader ir = IndexReader.open(dir2);
     try {
       pr.add(ir);
       fail("didn't get exptected exception: indexes don't have same number of documents");
@@ -149,7 +149,7 @@ public class TestParallelReader extends 
     w.addDocument(d2);
     w.close();
 
-    IndexReader ir = IndexReader.open(dir, false);
+    IndexReader ir = IndexReader.open(dir);
     return newSearcher(ir);
   }
 
@@ -158,8 +158,8 @@ public class TestParallelReader extends 
     dir1 = getDir1(random);
     dir2 = getDir2(random);
     ParallelReader pr = new ParallelReader();
-    pr.add(IndexReader.open(dir1, false));
-    pr.add(IndexReader.open(dir2, false));
+    pr.add(IndexReader.open(dir1));
+    pr.add(IndexReader.open(dir2));
     return newSearcher(pr);
   }
 

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java Mon Dec  5 01:41:38 2011
@@ -52,8 +52,8 @@ public class TestParallelReaderEmptyInde
 
     IndexWriter iwOut = new IndexWriter(rdOut, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     ParallelReader pr = new ParallelReader();
-    pr.add(IndexReader.open(rd1,true));
-    pr.add(IndexReader.open(rd2,true));
+    pr.add(IndexReader.open(rd1));
+    pr.add(IndexReader.open(rd2));
 		
     // When unpatched, Lucene crashes here with a NoSuchElementException (caused by ParallelTermEnum)
     iwOut.addIndexes(pr);
@@ -84,7 +84,7 @@ public class TestParallelReaderEmptyInde
       iw.addDocument(doc);
       iw.close();
 
-      IndexReader ir = IndexReader.open(rd1,false);
+      IndexReader ir = IndexReader.open(rd1);
       ir.deleteDocument(0);
       ir.close();
 
@@ -105,8 +105,8 @@ public class TestParallelReaderEmptyInde
 
     IndexWriter iwOut = new IndexWriter(rdOut, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random)));
     ParallelReader pr = new ParallelReader();
-    pr.add(IndexReader.open(rd1,true));
-    pr.add(IndexReader.open(rd2,true));
+    pr.add(IndexReader.open(rd1));
+    pr.add(IndexReader.open(rd2));
 
     // When unpatched, Lucene crashes here with an ArrayIndexOutOfBoundsException (caused by TermVectorsWriter)
     iwOut.addIndexes(pr);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java Mon Dec  5 01:41:38 2011
@@ -58,8 +58,8 @@ public class TestParallelTermEnum extend
 
         iw2.close();
 
-        this.ir1 = IndexReader.open(rd1, true);
-        this.ir2 = IndexReader.open(rd2, true);
+        this.ir1 = IndexReader.open(rd1);
+        this.ir2 = IndexReader.open(rd2);
     }
 
     @Override

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestPayloads.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestPayloads.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestPayloads.java Mon Dec  5 01:41:38 2011
@@ -111,7 +111,7 @@ public class TestPayloads extends Lucene
         // flush
         writer.close();
 
-      SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram, false));
+      SegmentReader reader = getOnlySegmentReader(IndexReader.open(ram));
         FieldInfos fi = reader.fieldInfos();
         assertFalse("Payload field bit should not be set.", fi.fieldInfo("f1").storePayloads);
         assertTrue("Payload field bit should be set.", fi.fieldInfo("f2").storePayloads);
@@ -138,7 +138,7 @@ public class TestPayloads extends Lucene
         // flush
         writer.close();
 
-      reader = getOnlySegmentReader(IndexReader.open(ram, false));
+      reader = getOnlySegmentReader(IndexReader.open(ram));
         fi = reader.fieldInfos();
         assertFalse("Payload field bit should not be set.", fi.fieldInfo("f1").storePayloads);
         assertTrue("Payload field bit should be set.", fi.fieldInfo("f2").storePayloads);
@@ -213,7 +213,7 @@ public class TestPayloads extends Lucene
          * Verify the index
          * first we test if all payloads are stored correctly
          */        
-        IndexReader reader = IndexReader.open(dir, true);
+        IndexReader reader = IndexReader.open(dir);
 
         byte[] verifyPayloadData = new byte[payloadDataLength];
         offset = 0;
@@ -326,7 +326,7 @@ public class TestPayloads extends Lucene
         // flush
         writer.close();
         
-        reader = IndexReader.open(dir, true);
+        reader = IndexReader.open(dir);
         tp = MultiFields.getTermPositionsEnum(reader,
                                               MultiFields.getLiveDocs(reader),
                                               fieldName,
@@ -526,7 +526,7 @@ public class TestPayloads extends Lucene
           ingesters[i].join();
         }
         writer.close();
-        IndexReader reader = IndexReader.open(dir, true);
+        IndexReader reader = IndexReader.open(dir);
         TermsEnum terms = MultiFields.getFields(reader).terms(field).iterator(null);
         Bits liveDocs = MultiFields.getLiveDocs(reader);
         DocsAndPositionsEnum tp = null;

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestRollback.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestRollback.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestRollback.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestRollback.java Mon Dec  5 01:41:38 2011
@@ -48,7 +48,7 @@ public class TestRollback extends Lucene
     }
     w.rollback();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     assertEquals("index should contain same number of docs post rollback", 5, r.numDocs());
     r.close();
     dir.close();

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermDocs.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermDocs.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermDocs.java Mon Dec  5 01:41:38 2011
@@ -130,7 +130,7 @@ public class TestSegmentTermDocs extends
     writer.forceMerge(1);
     writer.close();
     
-    IndexReader reader = IndexReader.open(dir, null, true, indexDivisor);
+    IndexReader reader = IndexReader.open(dir, indexDivisor);
 
     DocsEnum tdocs = _TestUtil.docs(random, reader,
                                     ta.field(),

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java Mon Dec  5 01:41:38 2011
@@ -78,7 +78,7 @@ public class TestSegmentTermEnum extends
     IndexWriter writer  = new IndexWriter(dir, newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setCodec(_TestUtil.alwaysPostingsFormat(new Lucene40PostingsFormat())));
     addDoc(writer, "aaa bbb");
     writer.close();
-    SegmentReader reader = getOnlySegmentReader(IndexReader.open(dir, false));
+    SegmentReader reader = getOnlySegmentReader(IndexReader.open(dir));
     TermsEnum terms = reader.fields().terms("content").iterator(null);
     assertNotNull(terms.next());
     assertEquals("aaa", terms.term().utf8ToString());
@@ -102,7 +102,7 @@ public class TestSegmentTermEnum extends
   private void verifyDocFreq()
       throws IOException
   {
-      IndexReader reader = IndexReader.open(dir, true);
+      IndexReader reader = IndexReader.open(dir);
       TermsEnum termEnum = MultiFields.getTerms(reader, "content").iterator(null);
 
     // create enumeration of all terms

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSizeBoundedForceMerge.java Mon Dec  5 01:41:38 2011
@@ -290,7 +290,7 @@ public class TestSizeBoundedForceMerge e
     writer.close();
   
     // delete the last document, so that the last segment is merged.
-    IndexReader r = IndexReader.open(dir, false);
+    IndexReader r = IndexReader.open(dir);
     r.deleteDocument(r.numDocs() - 1);
     r.close();
     
@@ -348,7 +348,7 @@ public class TestSizeBoundedForceMerge e
     writer.close();
   
     // delete the last document
-    IndexReader r = IndexReader.open(dir, false);
+    IndexReader r = IndexReader.open(dir);
     r.deleteDocument(r.numDocs() - 1);
     r.close();
     

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java Mon Dec  5 01:41:38 2011
@@ -54,7 +54,7 @@ public class TestSnapshotDeletionPolicy 
   }
 
   protected void checkMaxDoc(IndexCommit commit, int expectedMaxDoc) throws Exception {
-    IndexReader reader = IndexReader.open(commit, true);
+    IndexReader reader = IndexReader.open(commit);
     try {
       assertEquals(expectedMaxDoc, reader.maxDoc());
     } finally {
@@ -245,7 +245,7 @@ public class TestSnapshotDeletionPolicy 
     assertSnapshotExists(dir, sdp, numSnapshots);
 
     // open a reader on a snapshot - should succeed.
-    IndexReader.open(sdp.getSnapshot("snapshot0"), true).close();
+    IndexReader.open(sdp.getSnapshot("snapshot0")).close();
 
     // open a new IndexWriter w/ no snapshots to keep and assert that all snapshots are gone.
     sdp = getDeletionPolicy();

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java Mon Dec  5 01:41:38 2011
@@ -103,7 +103,7 @@ public class TestStressIndexing extends 
     @Override
     public void doWork() throws Throwable {
       for (int i=0; i<100; i++) {
-        IndexReader ir = IndexReader.open(directory, true);
+        IndexReader ir = IndexReader.open(directory);
         IndexSearcher is = new IndexSearcher(ir);
         is.close();
         ir.close();

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestStressIndexing2.java Mon Dec  5 01:41:38 2011
@@ -272,8 +272,8 @@ public class TestStressIndexing2 extends
   }
 
   public static void verifyEquals(Directory dir1, Directory dir2, String idField) throws Throwable {
-    IndexReader r1 = IndexReader.open(dir1, true);
-    IndexReader r2 = IndexReader.open(dir2, true);
+    IndexReader r1 = IndexReader.open(dir1);
+    IndexReader r2 = IndexReader.open(dir2);
     verifyEquals(r1, r2, idField);
     r1.close();
     r2.close();

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestSumDocFreq.java Mon Dec  5 01:41:38 2011
@@ -59,7 +59,7 @@ public class TestSumDocFreq extends Luce
     ir.close();
     
     /* nocommit: fix this to use IW to delete documents
-    ir = IndexReader.open(dir, false);
+    ir = IndexReader.open(dir);
     int numDeletions = atLeast(20);
     for (int i = 0; i < numDeletions; i++) {
       ir.deleteDocument(random.nextInt(ir.maxDoc()));
@@ -70,7 +70,7 @@ public class TestSumDocFreq extends Luce
     w.forceMerge(1);
     w.close();
     
-    ir = IndexReader.open(dir, true);
+    ir = IndexReader.open(dir);
     assertSumDocFreq(ir);
     ir.close();
     */

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermVectorsWriter.java Mon Dec  5 01:41:38 2011
@@ -59,7 +59,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     Terms vector = r.getTermVectors(0).terms("field");
     assertNotNull(vector);
     TermsEnum termsEnum = vector.iterator(null);
@@ -119,7 +119,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
@@ -156,7 +156,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
@@ -197,7 +197,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
@@ -235,7 +235,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
@@ -274,7 +274,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
@@ -325,7 +325,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
@@ -372,7 +372,7 @@ public class TestTermVectorsWriter exten
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     TermsEnum termsEnum = r.getTermVectors(0).terms("field").iterator(null);
     assertNotNull(termsEnum.next());
     DocsAndPositionsEnum dpEnum = termsEnum.docsAndPositions(null, null);
@@ -433,7 +433,7 @@ public class TestTermVectorsWriter exten
       writer.forceMerge(1);
       writer.close();
 
-      IndexReader reader = IndexReader.open(dir, true);
+      IndexReader reader = IndexReader.open(dir);
       for(int i=0;i<reader.numDocs();i++) {
         reader.document(i);
         reader.getTermVectors(i);
@@ -487,7 +487,7 @@ public class TestTermVectorsWriter exten
       writer.forceMerge(1);
       writer.close();
 
-      IndexReader reader = IndexReader.open(dir, true);
+      IndexReader reader = IndexReader.open(dir);
       assertNull(reader.getTermVectors(0));
       assertNull(reader.getTermVectors(1));
       assertNotNull(reader.getTermVectors(2));
@@ -532,7 +532,7 @@ public class TestTermVectorsWriter exten
     writer.forceMerge(1);
     writer.close();
 
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     for(int i=0;i<10;i++) {
       reader.getTermVectors(i);
       reader.document(i);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTermdocPerf.java Mon Dec  5 01:41:38 2011
@@ -112,7 +112,7 @@ public class TestTermdocPerf extends Luc
     long end = System.currentTimeMillis();
     if (VERBOSE) System.out.println("milliseconds for creation of " + ndocs + " docs = " + (end-start));
 
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
 
     TermsEnum tenum = MultiFields.getTerms(reader, "foo").iterator(null);
 

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestThreadedForceMerge.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestThreadedForceMerge.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestThreadedForceMerge.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestThreadedForceMerge.java Mon Dec  5 01:41:38 2011
@@ -123,7 +123,7 @@ public class TestThreadedForceMerge exte
           TEST_VERSION_CURRENT, ANALYZER).setOpenMode(
           OpenMode.APPEND).setMaxBufferedDocs(2));
       
-      IndexReader reader = IndexReader.open(directory, true);
+      IndexReader reader = IndexReader.open(directory);
       assertEquals("reader=" + reader, 1, reader.getSequentialSubReaders().length);
       assertEquals(expectedDocCount, reader.numDocs());
       reader.close();

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactionRollback.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactionRollback.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactionRollback.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactionRollback.java Mon Dec  5 01:41:38 2011
@@ -86,7 +86,7 @@ public class TestTransactionRollback ext
   }
 	
   private void checkExpecteds(BitSet expecteds) throws Exception {
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
 		
     //Perhaps not the most efficient approach but meets our
     //needs here.
@@ -204,7 +204,7 @@ public class TestTransactionRollback ext
       // should not work:
       new IndexWriter(dir, newIndexWriterConfig( TEST_VERSION_CURRENT, new MockAnalyzer(random))
           .setIndexDeletionPolicy(new DeleteLastCommitPolicy())).close();
-      IndexReader r = IndexReader.open(dir, true);
+      IndexReader r = IndexReader.open(dir);
       assertEquals(100, r.numDocs());
       r.close();
     }

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactions.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactions.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/TestTransactions.java Mon Dec  5 01:41:38 2011
@@ -183,8 +183,8 @@ public class TestTransactions extends Lu
     public void doWork() throws Throwable {
       IndexReader r1, r2;
       synchronized(lock) {
-        r1 = IndexReader.open(dir1, true);
-        r2 = IndexReader.open(dir2, true);
+        r1 = IndexReader.open(dir1);
+        r2 = IndexReader.open(dir2);
       }
       if (r1.numDocs() != r2.numDocs())
         throw new RuntimeException("doc counts differ: r1=" + r1.numDocs() + " r2=" + r2.numDocs());

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/codecs/perfield/TestPerFieldPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/codecs/perfield/TestPerFieldPostingsFormat.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/codecs/perfield/TestPerFieldPostingsFormat.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/codecs/perfield/TestPerFieldPostingsFormat.java Mon Dec  5 01:41:38 2011
@@ -190,7 +190,7 @@ public class TestPerFieldPostingsFormat 
     if (VERBOSE) {
       System.out.println("\nTEST: assertQuery " + t);
     }
-    IndexReader reader = IndexReader.open(dir, null, true, 1);
+    IndexReader reader = IndexReader.open(dir, 1);
     IndexSearcher searcher = newSearcher(reader);
     TopDocs search = searcher.search(new TermQuery(t), num + 10);
     assertEquals(num, search.totalHits);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/values/TestDocValuesIndexing.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/values/TestDocValuesIndexing.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/values/TestDocValuesIndexing.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/index/values/TestDocValuesIndexing.java Mon Dec  5 01:41:38 2011
@@ -87,7 +87,7 @@ public class TestDocValuesIndexing exten
 
     writer.close(true);
 
-    IndexReader reader = IndexReader.open(dir, null, true, 1);
+    IndexReader reader = IndexReader.open(dir, 1);
     assertEquals(1, reader.getSequentialSubReaders().length);
 
     IndexSearcher searcher = new IndexSearcher(reader);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java Mon Dec  5 01:41:38 2011
@@ -40,7 +40,7 @@ public class TestCachingWrapperFilter ex
     RandomIndexWriter writer = new RandomIndexWriter(random, dir);
     writer.close();
 
-    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir, true));
+    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir));
     AtomicReaderContext context = (AtomicReaderContext) reader.getTopReaderContext();
     MockFilter filter = new MockFilter();
     CachingWrapperFilter cacher = new CachingWrapperFilter(filter);
@@ -66,7 +66,7 @@ public class TestCachingWrapperFilter ex
     RandomIndexWriter writer = new RandomIndexWriter(random, dir);
     writer.close();
 
-    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir, true));
+    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir));
     AtomicReaderContext context = (AtomicReaderContext) reader.getTopReaderContext();
 
     final Filter filter = new Filter() {
@@ -89,7 +89,7 @@ public class TestCachingWrapperFilter ex
     RandomIndexWriter writer = new RandomIndexWriter(random, dir);
     writer.close();
 
-    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir, true));
+    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir));
     AtomicReaderContext context = (AtomicReaderContext) reader.getTopReaderContext();
 
     final Filter filter = new Filter() {
@@ -134,7 +134,7 @@ public class TestCachingWrapperFilter ex
     writer.addDocument(new Document());
     writer.close();
 
-    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir, true));
+    IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(dir));
 
     // not cacheable:
     assertDocIdSetCacheable(reader, new QueryWrapperFilter(new TermQuery(new Term("test","value"))), false);

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java Mon Dec  5 01:41:38 2011
@@ -544,7 +544,7 @@ public class TestFieldCacheRangeFilter e
     writer.deleteDocuments(new Term("id","0"));
     writer.close();
 
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     IndexSearcher search = newSearcher(reader);
     assertTrue(reader.hasDeletions());
 

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMatchAllDocsQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMatchAllDocsQuery.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMatchAllDocsQuery.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMatchAllDocsQuery.java Mon Dec  5 01:41:38 2011
@@ -46,7 +46,7 @@ public class TestMatchAllDocsQuery exten
     addDoc("three four", iw, 300f);
     iw.close();
 
-    IndexReader ir = IndexReader.open(dir, false);
+    IndexReader ir = IndexReader.open(dir);
     IndexSearcher is = newSearcher(ir);
     ScoreDoc[] hits;
 

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiTermQueryRewrites.java Mon Dec  5 01:41:38 2011
@@ -59,16 +59,16 @@ public class TestMultiTermQueryRewrites 
     writer.forceMerge(1); swriter1.forceMerge(1); swriter2.forceMerge(1);
     writer.close(); swriter1.close(); swriter2.close();
     
-    reader = IndexReader.open(dir, true);
+    reader = IndexReader.open(dir);
     searcher = newSearcher(reader);
     
     multiReader = new MultiReader(new IndexReader[] {
-      IndexReader.open(sdir1, true), IndexReader.open(sdir2, true) 
+      IndexReader.open(sdir1), IndexReader.open(sdir2) 
     }, true);
     multiSearcher = newSearcher(multiReader);
     
     multiReaderDupls = new MultiReader(new IndexReader[] {
-      IndexReader.open(sdir1, true), IndexReader.open(dir, true) 
+      IndexReader.open(sdir1), IndexReader.open(dir) 
     }, true);
     multiSearcherDupls = newSearcher(multiReaderDupls);
   }

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/TestMultiThreadTermVectors.java Mon Dec  5 01:41:38 2011
@@ -67,7 +67,7 @@ public class TestMultiThreadTermVectors 
     IndexReader reader = null;
     
     try {
-      reader = IndexReader.open(directory, true);
+      reader = IndexReader.open(directory);
       for(int i = 1; i <= numThreads; i++)
         testTermPositionVectors(reader, i);
       

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpans.java Mon Dec  5 01:41:38 2011
@@ -491,7 +491,7 @@ public class TestSpans extends LuceneTes
     writer.close();
 
     // Get searcher
-    final IndexReader reader = IndexReader.open(dir, true);
+    final IndexReader reader = IndexReader.open(dir);
     final IndexSearcher searcher = newSearcher(reader);
 
     // Control (make sure docs indexed)

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java Mon Dec  5 01:41:38 2011
@@ -76,7 +76,7 @@ public class TestSpansAdvanced2 extends 
    * @throws Exception
    */
   public void testVerifyIndex() throws Exception {
-    final IndexReader reader = IndexReader.open(mDirectory, true);
+    final IndexReader reader = IndexReader.open(mDirectory);
     assertEquals(8, reader.numDocs());
     reader.close();
   }

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java Mon Dec  5 01:41:38 2011
@@ -261,7 +261,7 @@ public class TestBufferedIndexInput exte
 
         dir.allIndexInputs.clear();
 
-        IndexReader reader = IndexReader.open(dir, false);
+        IndexReader reader = IndexReader.open(dir);
         Term aaa = new Term("content", "aaa");
         Term bbb = new Term("content", "bbb");
         Term ccc = new Term("content", "ccc");

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java Mon Dec  5 01:41:38 2011
@@ -94,7 +94,7 @@ public class TestFileSwitchDirectory ext
   public void testNoDir() throws Throwable {
     Directory dir = newFSSwitchDirectory(Collections.<String>emptySet());
     try {
-      IndexReader.open(dir, true);
+      IndexReader.open(dir);
       fail("did not hit expected exception");
     } catch (NoSuchDirectoryException nsde) {
       // expected

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestLockFactory.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestLockFactory.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestLockFactory.java Mon Dec  5 01:41:38 2011
@@ -345,7 +345,7 @@ public class TestLockFactory extends Luc
             Query query = new TermQuery(new Term("content", "aaa"));
             for(int i=0;i<this.numIteration;i++) {
                 try{
-                    reader = IndexReader.open(dir, false);
+                    reader = IndexReader.open(dir);
                     searcher = new IndexSearcher(reader);
                 } catch (Exception e) {
                     hitException = true;

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestNRTCachingDirectory.java Mon Dec  5 01:41:38 2011
@@ -123,7 +123,7 @@ public class TestNRTCachingDirectory ext
   public void testNoDir() throws Throwable {
     Directory dir = new NRTCachingDirectory(newFSDirectory(_TestUtil.getTempDir("doesnotexist")), 2.0, 25.0);
     try {
-      IndexReader.open(dir, true);
+      IndexReader.open(dir);
       fail("did not hit expected exception");
     } catch (NoSuchDirectoryException nsde) {
       // expected

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/store/TestRAMDirectory.java Mon Dec  5 01:41:38 2011
@@ -76,7 +76,7 @@ public class TestRAMDirectory extends Lu
     assertEquals(ramDir.sizeInBytes(), ramDir.getRecomputedSizeInBytes());
     
     // open reader to test document count
-    IndexReader reader = IndexReader.open(ramDir, true);
+    IndexReader reader = IndexReader.open(ramDir);
     assertEquals(docsToAdd, reader.numDocs());
     
     // open search zo check if all doc's are there

Modified: lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java (original)
+++ lucene/dev/branches/lucene3606/lucene/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java Mon Dec  5 01:41:38 2011
@@ -68,8 +68,8 @@ public class TestFieldCacheSanityChecker
     }
     wA.close();
     wB.close();
-    readerA = IndexReader.open(dirA, true);
-    readerB = IndexReader.open(dirB, true);
+    readerA = IndexReader.open(dirA);
+    readerB = IndexReader.open(dirB);
     readerX = new MultiReader(readerA, readerB);
   }
 

Modified: lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/core/StandardIndexReaderFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/core/StandardIndexReaderFactory.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/core/StandardIndexReaderFactory.java (original)
+++ lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/core/StandardIndexReaderFactory.java Mon Dec  5 01:41:38 2011
@@ -35,6 +35,7 @@ public class StandardIndexReaderFactory 
   @Override
   public IndexReader newReader(Directory indexDir, boolean readOnly)
       throws IOException {
-    return IndexReader.open(indexDir, null, readOnly, termInfosIndexDivisor);
+    assert readOnly; // nocommit: readOnly is ignored - remove
+    return IndexReader.open(indexDir, termInfosIndexDivisor);
   }
 }

Modified: lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java (original)
+++ lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java Mon Dec  5 01:41:38 2011
@@ -214,7 +214,7 @@ public class CoreAdminHandler extends Re
             Directory dir = dirFactory.get(dirNames[i], core.getSolrConfig().mainIndexConfig.lockType);
             dirsToBeReleased[i] = dir;
             // TODO: why doesn't this use the IR factory? what is going on here?
-            readersToBeClosed[i] = IndexReader.open(dir, true);
+            readersToBeClosed[i] = IndexReader.open(dir);
           }
         }
 

Modified: lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/FileBasedSpellChecker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/FileBasedSpellChecker.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/FileBasedSpellChecker.java (original)
+++ lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/FileBasedSpellChecker.java Mon Dec  5 01:41:38 2011
@@ -111,7 +111,7 @@ public class FileBasedSpellChecker exten
         writer.forceMerge(1);
         writer.close();
 
-        dictionary = new HighFrequencyDictionary(IndexReader.open(ramDir, true),
+        dictionary = new HighFrequencyDictionary(IndexReader.open(ramDir),
                 WORD_FIELD_NAME, 0.0f);
       } else {
         // check if character encoding is defined

Modified: lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/IndexBasedSpellChecker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/IndexBasedSpellChecker.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/IndexBasedSpellChecker.java (original)
+++ lucene/dev/branches/lucene3606/solr/core/src/java/org/apache/solr/spelling/IndexBasedSpellChecker.java Mon Dec  5 01:41:38 2011
@@ -64,7 +64,7 @@ public class IndexBasedSpellChecker exte
     if (sourceLocation != null) {
       try {
         FSDirectory luceneIndexDir = FSDirectory.open(new File(sourceLocation));
-        this.reader = IndexReader.open(luceneIndexDir, true);
+        this.reader = IndexReader.open(luceneIndexDir);
       } catch (IOException e) {
         throw new RuntimeException(e);
       }

Modified: lucene/dev/branches/lucene3606/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java?rev=1210305&r1=1210304&r2=1210305&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java (original)
+++ lucene/dev/branches/lucene3606/solr/core/src/test/org/apache/solr/core/AlternateDirectoryTest.java Mon Dec  5 01:41:38 2011
@@ -63,8 +63,9 @@ public class AlternateDirectoryTest exte
     @Override
     public IndexReader newReader(Directory indexDir, boolean readOnly)
         throws IOException {
+      assert readOnly; // nocommit: readOnly is ignored - remove
       TestIndexReaderFactory.newReaderCalled = true;
-      return IndexReader.open(indexDir, readOnly);
+      return IndexReader.open(indexDir);
     }
   }
 



Mime
View raw message