lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1726109 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/index/ lucene/core/src/test/org/apache/lucene/search/ lucene/sandbox/ lucene/sandbox/src/test/org/apache/lucene/codecs/idversion/ l...
Date Thu, 21 Jan 2016 21:44:40 GMT
Author: mikemccand
Date: Thu Jan 21 21:44:40 2016
New Revision: 1726109

URL: http://svn.apache.org/viewvc?rev=1726109&view=rev
Log:
LUCENE-6980: fix a few more tests to just use default (true) for applyAllDeletes

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestTryDelete.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
    lucene/dev/branches/branch_5x/lucene/sandbox/   (props changed)
    lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/codecs/idversion/TestIDVersionPostingsFormat.java
    lucene/dev/branches/branch_5x/lucene/spatial3d/   (props changed)
    lucene/dev/branches/branch_5x/lucene/suggest/   (props changed)
    lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java
    lucene/dev/branches/branch_5x/lucene/test-framework/   (props changed)
    lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
    lucene/dev/branches/branch_5x/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
Thu Jan 21 21:44:40 2016
@@ -895,7 +895,7 @@ public class TestBinaryDocValuesUpdates
                   reader = DirectoryReader.open(writer);
                 } else {
 //                  System.out.println("[" + Thread.currentThread().getName() + "] reopen
NRT");
-                  DirectoryReader r2 = DirectoryReader.openIfChanged(reader, writer, true);
+                  DirectoryReader r2 = DirectoryReader.openIfChanged(reader, writer);
                   if (r2 != null) {
                     reader.close();
                     reader = r2;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
Thu Jan 21 21:44:40 2016
@@ -2001,7 +2001,7 @@ public class TestIndexWriterExceptions e
         }
 
         // Trigger writeLiveDocs + writeFieldUpdates so we hit fake exc:
-        IndexReader r = w.getReader(true);
+        IndexReader r = w.getReader();
 
         // Sometimes we will make it here (we only randomly
         // throw the exc):

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java
Thu Jan 21 21:44:40 2016
@@ -93,7 +93,7 @@ public class TestIndexWriterNRTIsCurrent
         Document doc = new Document();
         doc.add(new TextField("id", "1", Field.Store.NO));
         writer.addDocument(doc);
-        holder.reader = currentReader = writer.getReader(true);
+        holder.reader = currentReader = writer.getReader();
         Term term = new Term("id");
         for (int i = 0; i < numOps && !holder.stop; i++) {
           float nextOp = random.nextFloat();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java
Thu Jan 21 21:44:40 2016
@@ -1062,7 +1062,7 @@ public class TestIndexWriterReader exten
 
     // Deletes nothing in reality...:
     w.deleteDocuments(new Term("foo", "bar"));
-    DirectoryReader r5 = DirectoryReader.openIfChanged(r3, w, true);
+    DirectoryReader r5 = DirectoryReader.openIfChanged(r3, w);
     assertNull(r5);
 
     r3.close();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
Thu Jan 21 21:44:40 2016
@@ -226,7 +226,7 @@ public class TestMixedDocValuesUpdates e
                   reader = DirectoryReader.open(writer);
                 } else {
 //                  System.out.println("[" + Thread.currentThread().getName() + "] reopen
NRT");
-                  DirectoryReader r2 = DirectoryReader.openIfChanged(reader, writer, true);
+                  DirectoryReader r2 = DirectoryReader.openIfChanged(reader, writer);
                   if (r2 != null) {
                     reader.close();
                     reader = r2;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
Thu Jan 21 21:44:40 2016
@@ -979,7 +979,7 @@ public class TestNumericDocValuesUpdates
                   reader = DirectoryReader.open(writer);
                 } else {
 //                  System.out.println("[" + Thread.currentThread().getName() + "] reopen
NRT");
-                  DirectoryReader r2 = DirectoryReader.openIfChanged(reader, writer, true);
+                  DirectoryReader r2 = DirectoryReader.openIfChanged(reader, writer);
                   if (r2 != null) {
                     reader.close();
                     reader = r2;

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestStressNRT.java
Thu Jan 21 21:44:40 2016
@@ -141,12 +141,12 @@ public class TestStressNRT extends Lucen
                       if (VERBOSE) {
                         System.out.println("TEST: " + Thread.currentThread().getName() +
": call writer.getReader");
                       }
-                      newReader = writer.getReader(true);
+                      newReader = writer.getReader();
                     } else {
                       if (VERBOSE) {
                         System.out.println("TEST: " + Thread.currentThread().getName() +
": reopen reader=" + oldReader + " version=" + version);
                       }
-                      newReader = DirectoryReader.openIfChanged(oldReader, writer.w, true);
+                      newReader = DirectoryReader.openIfChanged(oldReader, writer.w);
                     }
                   } else {
                     // assertU(commit());

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestTryDelete.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestTryDelete.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestTryDelete.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/index/TestTryDelete.java
Thu Jan 21 21:44:40 2016
@@ -77,7 +77,6 @@ public class TestTryDelete extends Lucen
     IndexWriter writer = getWriter(directory);
 
     ReferenceManager<IndexSearcher> mgr = new SearcherManager(writer,
-                                                              true,
                                                               new SearcherFactory());
 
     TrackingIndexWriter mgrWriter = new TrackingIndexWriter(writer);
@@ -125,7 +124,6 @@ public class TestTryDelete extends Lucen
     IndexWriter writer = getWriter(directory);
 
     ReferenceManager<IndexSearcher> mgr = new SearcherManager(writer,
-                                                              true,
                                                               new SearcherFactory());
 
     IndexSearcher searcher = mgr.acquire();
@@ -169,7 +167,6 @@ public class TestTryDelete extends Lucen
     IndexWriter writer = getWriter(directory);
 
     ReferenceManager<IndexSearcher> mgr = new SearcherManager(writer,
-                                                              true,
                                                               new SearcherFactory());
 
     IndexSearcher searcher = mgr.acquire();

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestControlledRealTimeReopenThread.java
Thu Jan 21 21:44:40 2016
@@ -232,7 +232,7 @@ public class TestControlledRealTimeReope
       };
 
     nrtNoDeletes = new SearcherManager(writer, false, sf);
-    nrtDeletes = new SearcherManager(writer, true, sf);
+    nrtDeletes = new SearcherManager(writer, sf);
                          
     nrtDeletesThread = new ControlledRealTimeReopenThread<>(genWriter, nrtDeletes,
maxReopenSec, minReopenSec);
     nrtDeletesThread.setName("NRTDeletes Reopen Thread");
@@ -437,7 +437,7 @@ public class TestControlledRealTimeReope
     Directory dir = newDirectory();
     IndexWriter iw = new IndexWriter(dir, new IndexWriterConfig(null));
     final AtomicBoolean afterRefreshCalled = new AtomicBoolean(false);
-    SearcherManager sm = new SearcherManager(iw, true, new SearcherFactory());
+    SearcherManager sm = new SearcherManager(iw, new SearcherFactory());
     sm.addListener(new ReferenceManager.RefreshListener() {
       @Override
       public void beforeRefresh() {
@@ -484,7 +484,7 @@ public class TestControlledRealTimeReope
     config.setIndexDeletionPolicy(sdp);
     config.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);
     final IndexWriter iw = new IndexWriter(dir, config);
-    SearcherManager sm = new SearcherManager(iw, true, new SearcherFactory());
+    SearcherManager sm = new SearcherManager(iw, new SearcherFactory());
     final TrackingIndexWriter tiw = new TrackingIndexWriter(iw);
     ControlledRealTimeReopenThread<IndexSearcher> controlledRealTimeReopenThread =
       new ControlledRealTimeReopenThread<>(tiw, sm, maxStaleSecs, 0);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestLiveFieldValues.java
Thu Jan 21 21:44:40 2016
@@ -48,7 +48,7 @@ public class TestLiveFieldValues extends
 
     final IndexWriter w = new IndexWriter(dir, iwc);
 
-    final SearcherManager mgr = new SearcherManager(w, true, new SearcherFactory() {
+    final SearcherManager mgr = new SearcherManager(w, new SearcherFactory() {
         @Override
         public IndexSearcher newSearcher(IndexReader r, IndexReader previous) {
           return new IndexSearcher(r);

Modified: lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/search/TestSearcherManager.java
Thu Jan 21 21:44:40 2016
@@ -89,7 +89,7 @@ public class TestSearcherManager extends
       // TODO: can we randomize the applyAllDeletes?  But
       // somehow for final searcher we must apply
       // deletes...
-      mgr = new SearcherManager(writer, true, factory);
+      mgr = new SearcherManager(writer, factory);
       isNRT = true;
     } else {
       // SearcherManager needs to see empty commit:

Modified: lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/codecs/idversion/TestIDVersionPostingsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/codecs/idversion/TestIDVersionPostingsFormat.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/codecs/idversion/TestIDVersionPostingsFormat.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/sandbox/src/test/org/apache/lucene/codecs/idversion/TestIDVersionPostingsFormat.java
Thu Jan 21 21:44:40 2016
@@ -269,7 +269,7 @@ public class TestIDVersionPostingsFormat
     }
 
     IndexReader r = w.getReader();
-    //IndexReader r = DirectoryReader.open(w, true);
+    //IndexReader r = DirectoryReader.open(w);
     PerThreadVersionPKLookup lookup = new PerThreadVersionPKLookup(r, "id");
 
     List<Map.Entry<String,Long>> idValuesList = new ArrayList<>(idValues.entrySet());
@@ -655,7 +655,7 @@ public class TestIDVersionPostingsFormat
 
     final AtomicLong nextVersion = new AtomicLong();
 
-    final SearcherManager mgr = new SearcherManager(w.w, true, new SearcherFactory());
+    final SearcherManager mgr = new SearcherManager(w.w, new SearcherFactory());
 
     final Long missingValue = -1L;
 

Modified: lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingInfixSuggester.java
Thu Jan 21 21:44:40 2016
@@ -250,7 +250,7 @@ public class AnalyzingInfixSuggester ext
       // Already built; open it:
       writer = new IndexWriter(dir,
                                getIndexWriterConfig(getGramAnalyzer(), IndexWriterConfig.OpenMode.APPEND));
-      searcherMgr = new SearcherManager(writer, true, null);
+      searcherMgr = new SearcherManager(writer, null);
     }
   }
 
@@ -312,7 +312,7 @@ public class AnalyzingInfixSuggester ext
       if (commitOnBuild) {
         commit();
       }
-      searcherMgr = new SearcherManager(writer, true, null);
+      searcherMgr = new SearcherManager(writer, null);
       success = true;
     } finally {
       if (success == false && writer != null) {
@@ -365,7 +365,7 @@ public class AnalyzingInfixSuggester ext
       }
       writer = new IndexWriter(dir,
           getIndexWriterConfig(getGramAnalyzer(), IndexWriterConfig.OpenMode.CREATE));
-      searcherMgr = new SearcherManager(writer, true, null);
+      searcherMgr = new SearcherManager(writer, null);
     }
   }
 

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
Thu Jan 21 21:44:40 2016
@@ -461,7 +461,7 @@ public abstract class ShardSearchingTest
         iwc.setInfoStream(new PrintStreamInfoStream(System.out));
       }
       writer = new IndexWriter(dir, iwc);
-      mgr = new SearcherManager(writer, true, null);
+      mgr = new SearcherManager(writer, null);
       searchers = new SearcherLifetimeManager();
 
       // Init w/ 0s... caller above will do initial

Modified: lucene/dev/branches/branch_5x/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java?rev=1726109&r1=1726108&r2=1726109&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/test-framework/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java
Thu Jan 21 21:44:40 2016
@@ -287,7 +287,7 @@ public class TestCompressingStoredFields
     // by this test.
     iwConf.setCodec(CompressingCodec.randomInstance(random(), 4*1024, 100, false, 8));
     IndexWriter iw = new IndexWriter(dir, iwConf);
-    DirectoryReader ir = DirectoryReader.open(iw, true);
+    DirectoryReader ir = DirectoryReader.open(iw);
     for (int i = 0; i < 5; i++) {
       Document doc = new Document();
       doc.add(new StoredField("text", "not very long at all"));



Mime
View raw message