Apache Lucene open-source search software
LUCENE-6697: rename NumericTree -> RangeTree
Michael McCandlessa7ecfc274a1b
diff --git a/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesFormat.java b/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesFormat.javaindex 4bd62cb8d25..4a2752a5411 100644--- a/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesFormat.java+++ b/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesFormat.java@@ -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;diff --git a/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesProducer.java b/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesProducer.javaindex b5694711fcd..bee5df45ba0 100644--- a/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesProducer.java+++ b/lucene/sandbox/src/java/org/apache/lucene/rangetree/RangeTreeDocValuesProducer.java@@ -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 loadRangeTreeDocValuesProducer(RangeTreeDocValuesProducer orig) throws IOException {assert Thread.holdsLock(orig);datIn = orig.datIn.clone();diff --git a/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.java b/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.javaindex 1641d1f97e1..c9035028169 100644--- a/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.java+++ b/lucene/sandbox/src/test/org/apache/lucene/rangetree/TestRangeTree.java@@ -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)));