lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwe...@apache.org
Subject [lucene-solr] branch branch_8x updated: LUCENE-8636: follow-up speedups and cleanups.
Date Tue, 15 Jan 2019 11:03:24 GMT
This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new cbbf703  LUCENE-8636: follow-up speedups and cleanups.
cbbf703 is described below

commit cbbf703f6aaa94c78af3fccd03893852353e8d05
Author: Dawid Weiss <dweiss@apache.org>
AuthorDate: Tue Jan 15 12:02:15 2019 +0100

    LUCENE-8636: follow-up speedups and cleanups.
---
 .../org/apache/lucene/search/TestPointQueries.java  | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java b/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java
index 29997f1..7e322f4 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestPointQueries.java
@@ -354,11 +354,6 @@ public class TestPointQueries extends LuceneTestCase {
     doTestRandomLongs(10000);
   }
 
-  @Nightly
-  public void testRandomLongsBig() throws Exception {
-    doTestRandomLongs(50000);
-  }
-
   private void doTestRandomLongs(int count) throws Exception {
 
     int numValues = TestUtil.nextInt(random(), count, count*2);
@@ -432,9 +427,8 @@ public class TestPointQueries extends LuceneTestCase {
     Document doc = null;
     int lastID = -1;
 
-    RandomIndexWriter w = new RandomIndexWriter(random(), dir, iwc);
-    for(int ord=0;ord<values.length;ord++) {
-
+    IndexWriter w = new IndexWriter(dir, iwc);
+    for (int ord = 0; ord < values.length; ord++) {
       int id;
       if (ids == null) {
         id = ord;
@@ -483,7 +477,7 @@ public class TestPointQueries extends LuceneTestCase {
       }
       w.forceMerge(1);
     }
-    final IndexReader r = w.getReader();
+    final IndexReader r = DirectoryReader.open(w);
     w.close();
 
     IndexSearcher s = newSearcher(r, false);
@@ -612,11 +606,6 @@ public class TestPointQueries extends LuceneTestCase {
     doTestRandomBinary(10000);
   }
 
-  @Nightly
-  public void testRandomBinaryBig() throws Exception {
-    doTestRandomBinary(50000);
-  }
-
   private void doTestRandomBinary(int count) throws Exception {
     int numValues = TestUtil.nextInt(random(), count, count*2);
     int numBytesPerDim = TestUtil.nextInt(random(), 2, PointValues.MAX_NUM_BYTES);
@@ -679,7 +668,7 @@ public class TestPointQueries extends LuceneTestCase {
       dir = newDirectory();
     }
 
-    RandomIndexWriter w = new RandomIndexWriter(random(), dir, iwc);
+    IndexWriter w = new IndexWriter(dir, iwc);
 
     int numValues = docValues.length;
     if (VERBOSE) {
@@ -751,7 +740,7 @@ public class TestPointQueries extends LuceneTestCase {
       }
       w.forceMerge(1);
     }
-    final IndexReader r = w.getReader();
+    final IndexReader r = DirectoryReader.open(w);
     w.close();
 
     IndexSearcher s = newSearcher(r, false);


Mime
View raw message