mirror of https://github.com/apache/lucene.git
LUCENE-6697: rename NumericTree -> RangeTree
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1693693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
00bedc01c2
commit
a7ecfc274a
|
@ -65,12 +65,12 @@ import java.io.IOException;
|
|||
|
||||
public class RangeTreeDocValuesFormat extends DocValuesFormat {
|
||||
|
||||
static final String DATA_CODEC_NAME = "NumericTreeData";
|
||||
static final String DATA_CODEC_NAME = "RangeTreeData";
|
||||
static final int DATA_VERSION_START = 0;
|
||||
static final int DATA_VERSION_CURRENT = DATA_VERSION_START;
|
||||
static final String DATA_EXTENSION = "ndd";
|
||||
|
||||
static final String META_CODEC_NAME = "NumericTreeMeta";
|
||||
static final String META_CODEC_NAME = "RangeTreeMeta";
|
||||
static final int META_VERSION_START = 0;
|
||||
static final int META_VERSION_CURRENT = META_VERSION_START;
|
||||
static final String META_EXTENSION = "ndm";
|
||||
|
@ -94,7 +94,7 @@ public class RangeTreeDocValuesFormat extends DocValuesFormat {
|
|||
*
|
||||
* @lucene.experimental */
|
||||
public RangeTreeDocValuesFormat(int maxPointsInLeafNode, int maxPointsSortInHeap) {
|
||||
super("NumericTree");
|
||||
super("RangeTree");
|
||||
RangeTreeWriter.verifyParams(maxPointsInLeafNode, maxPointsSortInHeap);
|
||||
this.maxPointsInLeafNode = maxPointsInLeafNode;
|
||||
this.maxPointsSortInHeap = maxPointsSortInHeap;
|
||||
|
|
|
@ -78,7 +78,7 @@ class RangeTreeDocValuesProducer extends DocValuesProducer {
|
|||
merging = false;
|
||||
}
|
||||
|
||||
// clone for merge: we don't hang onto the NumericTrees we load
|
||||
// clone for merge: we don't hang onto the RangeTrees we load
|
||||
RangeTreeDocValuesProducer(RangeTreeDocValuesProducer orig) throws IOException {
|
||||
assert Thread.holdsLock(orig);
|
||||
datIn = orig.datIn.clone();
|
||||
|
|
|
@ -143,7 +143,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
}
|
||||
IndexReader r = w.getReader();
|
||||
w.close();
|
||||
// We can't wrap with "exotic" readers because the NumericRangeTreeQuery must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the NumericRangeTreeQuery must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
|
||||
int iters = atLeast(100);
|
||||
|
@ -230,7 +230,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
}
|
||||
IndexReader r = w.getReader();
|
||||
w.close();
|
||||
// We can't wrap with "exotic" readers because the NumericRangeTreeQuery must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the NumericRangeTreeQuery must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
|
||||
int iters = atLeast(100);
|
||||
|
@ -407,7 +407,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
final IndexReader r = DirectoryReader.open(w, true);
|
||||
w.close();
|
||||
|
||||
// We can't wrap with "exotic" readers because the NumericRangeTreeQuery must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the NumericRangeTreeQuery must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
|
||||
int numThreads = TestUtil.nextInt(random(), 2, 5);
|
||||
|
@ -545,7 +545,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
w.addDocument(doc);
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
// Need to run a query so the DV field is really loaded:
|
||||
TopDocs hits = s.search(new NumericRangeTreeQuery("value", -30L, true, 187L, true), 1);
|
||||
|
@ -570,7 +570,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
|
||||
assertEquals(1, s.count(new NumericRangeTreeQuery("value", Long.MIN_VALUE, true, 0L, true)));
|
||||
|
@ -595,7 +595,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
|
||||
assertEquals(1, s.count(new SortedSetRangeTreeQuery("value", new BytesRef("aaa"), true, new BytesRef("bbb"), true)));
|
||||
|
@ -628,7 +628,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
|
||||
assertEquals(2, s.count(new NumericRangeTreeQuery("value", Long.MIN_VALUE, true, Long.MAX_VALUE, true)));
|
||||
|
@ -656,7 +656,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
|
||||
assertEquals(2, s.count(new SortedSetRangeTreeQuery("value", longToBytes(Long.MIN_VALUE), true, longToBytes(Long.MAX_VALUE), true)));
|
||||
|
@ -684,7 +684,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
assertEquals(0, s.count(new SortedSetRangeTreeQuery("value", new BytesRef("m"), true, new BytesRef("n"), false)));
|
||||
|
||||
|
@ -708,7 +708,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
assertEquals(0, s.count(new NumericRangeTreeQuery("value", 17L, true, 13L, false)));
|
||||
|
||||
|
@ -725,7 +725,7 @@ public class TestRangeTree extends LuceneTestCase {
|
|||
|
||||
IndexReader r = w.getReader();
|
||||
|
||||
// We can't wrap with "exotic" readers because the query must see the NumericTreeDVFormat:
|
||||
// We can't wrap with "exotic" readers because the query must see the RangeTreeDVFormat:
|
||||
IndexSearcher s = newSearcher(r, false);
|
||||
assertEquals(0, s.count(new NumericRangeTreeQuery("value", 17L, true, 13L, false)));
|
||||
|
||||
|
|
Loading…
Reference in New Issue