You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2019/01/15 11:03:25 UTC
[lucene-solr] branch master updated: LUCENE-8636: follow-up
speedups and cleanups.
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new f083473 LUCENE-8636: follow-up speedups and cleanups.
f083473 is described below
commit f083473b891e596def2877b5429fcfa6db175464
Author: Dawid Weiss <dw...@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);