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:23 UTC
[lucene-solr] branch branch_7x 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 branch_7x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_7x by this push:
new df5d6de LUCENE-8636: follow-up speedups and cleanups.
df5d6de is described below
commit df5d6de473f2b48b03418df706481bea7fe3bfe0
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 49f5c6e..68fe3ff 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);