lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1210308 - in /lucene/dev/branches/lucene3606/modules: analysis/common/src/test/org/apache/lucene/analysis/core/ analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/ analysis/common/src/test/org/apache/lucene/analysis/query/ a...
Date Mon, 05 Dec 2011 01:59:12 GMT
Author: rmuir
Date: Mon Dec  5 01:59:11 2011
New Revision: 1210308

URL: http://svn.apache.org/viewvc?rev=1210308&view=rev
Log:
LUCENE-3606: fix more tests

Modified:
    lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestClassicAnalyzer.java
    lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java
    lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java
    lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java
    lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java
    lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
    lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java
    lucene/dev/branches/lucene3606/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
    lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java
    lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java
    lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java
    lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestSpellChecker.java

Modified: lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestClassicAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestClassicAnalyzer.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestClassicAnalyzer.java
(original)
+++ lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestClassicAnalyzer.java
Mon Dec  5 01:59:11 2011
@@ -270,7 +270,7 @@ public class TestClassicAnalyzer extends
     writer.addDocument(doc);
     writer.close();
 
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
 
     // Make sure all terms < max size were indexed
     assertEquals(2, reader.docFreq(new Term("content", "abc")));
@@ -303,7 +303,7 @@ public class TestClassicAnalyzer extends
     writer  = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, sa));
     writer.addDocument(doc);
     writer.close();
-    reader = IndexReader.open(dir, true);
+    reader = IndexReader.open(dir);
     assertEquals(1, reader.docFreq(new Term("content", bigTerm)));
     reader.close();
 

Modified: lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java
(original)
+++ lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/core/TestKeywordAnalyzer.java
Mon Dec  5 01:59:11 2011
@@ -95,7 +95,7 @@ public class TestKeywordAnalyzer extends
     writer.addDocument(doc);
     writer.close();
 
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     DocsEnum td = _TestUtil.docs(random,
                                  reader,
                                  "partnum",

Modified: lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java
(original)
+++ lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java
Mon Dec  5 01:59:11 2011
@@ -61,7 +61,7 @@ public class TestLimitTokenCountAnalyzer
     writer.addDocument(doc);
     writer.close();
 
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     Term t = new Term("field", "x");
     assertEquals(1, reader.docFreq(t));
     reader.close();

Modified: lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java
(original)
+++ lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/query/QueryAutoStopWordAnalyzerTest.java
Mon Dec  5 01:59:11 2011
@@ -53,7 +53,7 @@ public class QueryAutoStopWordAnalyzerTe
       writer.addDocument(doc);
     }
     writer.close();
-    reader = IndexReader.open(dir, true);
+    reader = IndexReader.open(dir);
   }
 
   @Override

Modified: lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java
(original)
+++ lucene/dev/branches/lucene3606/modules/analysis/common/src/test/org/apache/lucene/analysis/sinks/TestTeeSinkTokenFilter.java
Mon Dec  5 01:59:11 2011
@@ -104,7 +104,7 @@ public class TestTeeSinkTokenFilter exte
     w.addDocument(doc);
     w.close();
 
-    IndexReader r = IndexReader.open(dir, true);
+    IndexReader r = IndexReader.open(dir);
     Terms vector = r.getTermVectors(0).terms("field");
     assertEquals(1, vector.getUniqueTermCount());
     TermsEnum termsEnum = vector.iterator(null);

Modified: lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
(original)
+++ lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
Mon Dec  5 01:59:11 2011
@@ -84,7 +84,7 @@ public abstract class ReadTask extends P
     if (searcher == null) {
       // open our own reader
       Directory dir = getRunData().getDirectory();
-      reader = IndexReader.open(dir, true);
+      reader = IndexReader.open(dir);
       searcher = new IndexSearcher(reader);
       closeSearcher = true;
     } else {

Modified: lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java
(original)
+++ lucene/dev/branches/lucene3606/modules/benchmark/src/java/org/apache/lucene/benchmark/quality/utils/QualityQueriesFinder.java
Mon Dec  5 01:59:11 2011
@@ -86,7 +86,7 @@ public class QualityQueriesFinder {
   
   private String [] bestTerms(String field,int numTerms) throws IOException {
     PriorityQueue<TermDf> pq = new TermsDfQueue(numTerms);
-    IndexReader ir = IndexReader.open(dir, true);
+    IndexReader ir = IndexReader.open(dir);
     try {
       int threshold = ir.maxDoc() / 10; // ignore words too common.
       Terms terms = MultiFields.getTerms(ir, field);

Modified: lucene/dev/branches/lucene3606/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
(original)
+++ lucene/dev/branches/lucene3606/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
Mon Dec  5 01:59:11 2011
@@ -102,7 +102,7 @@ public class TestPerfTasksLogic extends 
         new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))
             .setOpenMode(OpenMode.APPEND));
     iw.close();
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     assertEquals("1000 docs were added to the index, this is what we expect to find!",1000,ir.numDocs());
     ir.close();
   }
@@ -188,7 +188,7 @@ public class TestPerfTasksLogic extends 
     // now we should be able to open the index for write.
     IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND));
     iw.close();
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     assertEquals("100 docs were added to the index, this is what we expect to find!",100,ir.numDocs());
     ir.close();
   }
@@ -227,7 +227,7 @@ public class TestPerfTasksLogic extends 
     // now we should be able to open the index for write.
     IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND));
     iw.close();
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     assertEquals("1000 docs were added to the index, this is what we expect to find!",1000,ir.numDocs());
     ir.close();
   }
@@ -300,7 +300,7 @@ public class TestPerfTasksLogic extends 
     // now we should be able to open the index for write. 
     IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT,
new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND));
     iw.close();
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     assertEquals("1 docs were added to the index, this is what we expect to find!",1,ir.numDocs());
     ir.close();
   }
@@ -331,7 +331,7 @@ public class TestPerfTasksLogic extends 
     // 3. execute the algorithm  (required in every "logic" test)
     Benchmark benchmark = execBenchmark(algLines);
 
-    IndexReader r = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader r = IndexReader.open(benchmark.getRunData().getDirectory());
     DocTermsIndex idx = FieldCache.DEFAULT.getTermsIndex(r, "country");
     final int maxDoc = r.maxDoc();
     assertEquals(1000, maxDoc);
@@ -367,7 +367,7 @@ public class TestPerfTasksLogic extends 
     Benchmark benchmark = execBenchmark(algLines);
 
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 20; // first 20 reuters docs.
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();
@@ -432,7 +432,7 @@ public class TestPerfTasksLogic extends 
             .setOpenMode(OpenMode.APPEND));
     iw.close();
 
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     assertEquals(numLines + " lines were created but " + ir.numDocs() + " docs are in the
index", numLines, ir.numDocs());
     ir.close();
 
@@ -476,7 +476,7 @@ public class TestPerfTasksLogic extends 
     }
 
     // Separately count how many tokens are actually in the index:
-    IndexReader reader = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader reader = IndexReader.open(benchmark.getRunData().getDirectory());
     assertEquals(NUM_DOCS, reader.numDocs());
 
     int totalTokenCount2 = 0;
@@ -535,7 +535,7 @@ public class TestPerfTasksLogic extends 
     Benchmark benchmark = execBenchmark(algLines);
 
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 2 * 20; // first 20 reuters docs.
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();
@@ -572,7 +572,7 @@ public class TestPerfTasksLogic extends 
     Benchmark benchmark = execBenchmark(algLines);
 
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 20;  // first 20 reuters docs.
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();
@@ -609,7 +609,7 @@ public class TestPerfTasksLogic extends 
     Benchmark benchmark = execBenchmark(algLines);
 
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 20; // first 20 reuters docs.
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();
@@ -651,7 +651,7 @@ public class TestPerfTasksLogic extends 
     Benchmark benchmark = execBenchmark(algLines);
 
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 16; // first 20 reuters docs, minus 20%
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();
@@ -690,7 +690,7 @@ public class TestPerfTasksLogic extends 
     benchmark.getRunData().getIndexWriter().close();
 
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 20; // first 20 reuters docs.
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();
@@ -736,7 +736,7 @@ public class TestPerfTasksLogic extends 
     benchmark.getRunData().getIndexWriter().close();
     
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 20; // first 20 reuters docs.
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();
@@ -780,7 +780,7 @@ public class TestPerfTasksLogic extends 
     assertFalse(((LogMergePolicy) writer.getConfig().getMergePolicy()).getUseCompoundFile());
     writer.close();
     Directory dir = benchmark.getRunData().getDirectory();
-    IndexReader reader = IndexReader.open(dir, true);
+    IndexReader reader = IndexReader.open(dir);
     Fields tfv = reader.getTermVectors(0);
     assertNotNull(tfv);
     assertTrue(tfv.getUniqueFieldCount() > 0);
@@ -856,7 +856,7 @@ public class TestPerfTasksLogic extends 
     Benchmark benchmark = execBenchmark(algLines);
 
     // 3. test number of docs in the index
-    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
+    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
     int ndocsExpected = 20; // first 20 reuters docs.
     assertEquals("wrong number of docs in the index!", ndocsExpected, ir.numDocs());
     ir.close();

Modified: lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java
(original)
+++ lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/TestParser.java
Mon Dec  5 01:59:11 2011
@@ -76,7 +76,7 @@ public class TestParser extends LuceneTe
     }
     d.close();
     writer.close();
-    reader = IndexReader.open(dir, true);
+    reader = IndexReader.open(dir);
     searcher = newSearcher(reader);
 
   }

Modified: lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java
(original)
+++ lucene/dev/branches/lucene3606/modules/queryparser/src/test/org/apache/lucene/queryparser/xml/builders/TestNumericRangeFilterBuilder.java
Mon Dec  5 01:59:11 2011
@@ -63,7 +63,7 @@ public class TestNumericRangeFilterBuild
     IndexWriter writer = new IndexWriter(ramDir, newIndexWriterConfig(TEST_VERSION_CURRENT,
null));
     writer.commit();
     try {
-      IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(ramDir, true));
+      IndexReader reader = new SlowMultiReaderWrapper(IndexReader.open(ramDir));
       try {
         assertNull(filter.getDocIdSet((AtomicReaderContext) reader.getTopReaderContext(),
reader.getLiveDocs()));
       }

Modified: lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java
(original)
+++ lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java
Mon Dec  5 01:59:11 2011
@@ -84,7 +84,7 @@ public class TestLuceneDictionary extend
   
   public void testFieldNonExistent() throws IOException {
     try {
-      indexReader = IndexReader.open(store, true);
+      indexReader = IndexReader.open(store);
 
       ld = new LuceneDictionary(indexReader, "nonexistent_field");
       it = ld.getWordsIterator();
@@ -98,7 +98,7 @@ public class TestLuceneDictionary extend
 
   public void testFieldAaa() throws IOException {
     try {
-      indexReader = IndexReader.open(store, true);
+      indexReader = IndexReader.open(store);
 
       ld = new LuceneDictionary(indexReader, "aaa");
       it = ld.getWordsIterator();
@@ -114,7 +114,7 @@ public class TestLuceneDictionary extend
 
   public void testFieldContents_1() throws IOException {
     try {
-      indexReader = IndexReader.open(store, true);
+      indexReader = IndexReader.open(store);
 
       ld = new LuceneDictionary(indexReader, "contents");
       it = ld.getWordsIterator();
@@ -144,7 +144,7 @@ public class TestLuceneDictionary extend
 
   public void testFieldContents_2() throws IOException {
     try {
-      indexReader = IndexReader.open(store, true);
+      indexReader = IndexReader.open(store);
 
       ld = new LuceneDictionary(indexReader, "contents");
       it = ld.getWordsIterator();
@@ -176,7 +176,7 @@ public class TestLuceneDictionary extend
 
   public void testFieldZzz() throws IOException {
     try {
-      indexReader = IndexReader.open(store, true);
+      indexReader = IndexReader.open(store);
 
       ld = new LuceneDictionary(indexReader, "zzz");
       it = ld.getWordsIterator();
@@ -194,7 +194,7 @@ public class TestLuceneDictionary extend
   public void testSpellchecker() throws IOException {
     Directory dir = newDirectory();
     SpellChecker sc = new SpellChecker(dir);
-    indexReader = IndexReader.open(store, true);
+    indexReader = IndexReader.open(store);
     sc.indexDictionary(new LuceneDictionary(indexReader, "contents"), newIndexWriterConfig(TEST_VERSION_CURRENT,
null), false);
     String[] suggestions = sc.suggestSimilar("Tam", 1);
     assertEquals(1, suggestions.length);

Modified: lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestSpellChecker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestSpellChecker.java?rev=1210308&r1=1210307&r2=1210308&view=diff
==============================================================================
--- lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestSpellChecker.java
(original)
+++ lucene/dev/branches/lucene3606/modules/suggest/src/test/org/apache/lucene/search/spell/TestSpellChecker.java
Mon Dec  5 01:59:11 2011
@@ -104,7 +104,7 @@ public class TestSpellChecker extends Lu
 
 
   public void testBuild() throws CorruptIndexException, IOException {
-    IndexReader r = IndexReader.open(userindex, true);
+    IndexReader r = IndexReader.open(userindex);
 
     spellChecker.clearIndex();
 
@@ -144,7 +144,7 @@ public class TestSpellChecker extends Lu
   }
 
   public void testComparator() throws Exception {
-    IndexReader r = IndexReader.open(userindex, true);
+    IndexReader r = IndexReader.open(userindex);
     Directory compIdx = newDirectory();
     SpellChecker compareSP = new SpellCheckerMock(compIdx, new LevensteinDistance(), new
SuggestWordFrequencyComparator());
     addwords(r, compareSP, "field3");
@@ -162,7 +162,7 @@ public class TestSpellChecker extends Lu
   }
   
   public void testBogusField() throws Exception {
-    IndexReader r = IndexReader.open(userindex, true);
+    IndexReader r = IndexReader.open(userindex);
     Directory compIdx = newDirectory();
     SpellChecker compareSP = new SpellCheckerMock(compIdx, new LevensteinDistance(), new
SuggestWordFrequencyComparator());
     addwords(r, compareSP, "field3");
@@ -177,7 +177,7 @@ public class TestSpellChecker extends Lu
   }
   
   public void testSuggestModes() throws Exception {
-    IndexReader r = IndexReader.open(userindex, true);
+    IndexReader r = IndexReader.open(userindex);
     spellChecker.clearIndex();
     addwords(r, spellChecker, "field1");
     
@@ -337,7 +337,7 @@ public class TestSpellChecker extends Lu
   }
 
   private int numdoc() throws IOException {
-    IndexReader rs = IndexReader.open(spellindex, true);
+    IndexReader rs = IndexReader.open(spellindex);
     int num = rs.numDocs();
     assertTrue(num != 0);
     //System.out.println("num docs: " + num);
@@ -346,7 +346,7 @@ public class TestSpellChecker extends Lu
   }
   
   public void testClose() throws IOException {
-    IndexReader r = IndexReader.open(userindex, true);
+    IndexReader r = IndexReader.open(userindex);
     spellChecker.clearIndex();
     String field = "field1";
     addwords(r, spellChecker, "field1");
@@ -402,7 +402,7 @@ public class TestSpellChecker extends Lu
    */
   public void testConcurrentAccess() throws IOException, InterruptedException {
     assertEquals(1, searchers.size());
-    final IndexReader r = IndexReader.open(userindex, true);
+    final IndexReader r = IndexReader.open(userindex);
     spellChecker.clearIndex();
     assertEquals(2, searchers.size());
     addwords(r, spellChecker, "field1");



Mime
View raw message