Upgrade to lucene-7.0.0-snapshot-00142c9. (#25641)
Lucene 7.0 is feature-frozen now, so there should not be many changes until GA.
This commit is contained in:
parent
92849c64db
commit
481d5d09b2
|
@ -1,6 +1,6 @@
|
|||
# When updating elasticsearch, please update 'rest' version in core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
|
||||
elasticsearch = 6.0.0-beta1
|
||||
lucene = 7.0.0-snapshot-ad2cb77
|
||||
lucene = 7.0.0-snapshot-00142c9
|
||||
|
||||
# optional dependencies
|
||||
spatial4j = 0.6
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
f77cf26c5b00236aee5f2153ec73ad93a1de2c8c
|
|
@ -1 +0,0 @@
|
|||
00d3260223eac0405a82eeeb8439de0e5eb5f888
|
|
@ -0,0 +1 @@
|
|||
818396925ddb710f1f922265242c1bff5c7bc45f
|
|
@ -1 +0,0 @@
|
|||
3a698989219afd9150738899bc849075c102881b
|
|
@ -0,0 +1 @@
|
|||
decbf76ec732066c26158fff8763b77bb55fffcc
|
|
@ -1 +0,0 @@
|
|||
bb636d31949418943454dbe2d72b9b66cd743f9f
|
|
@ -0,0 +1 @@
|
|||
b14da3f80fb98ee7278f47d65db541b9db91fc9f
|
|
@ -1 +0,0 @@
|
|||
720252d786273edcc48b2ae7b380bc229fe8930c
|
|
@ -0,0 +1 @@
|
|||
bf009e463e0bca00f968286ca978031e1bbdf69d
|
|
@ -1 +0,0 @@
|
|||
735178c26f3eb361c30657beeec9e57bd5548d58
|
|
@ -0,0 +1 @@
|
|||
828f3d137269a5dc4bdd42de09520ea65590b5a2
|
|
@ -1 +0,0 @@
|
|||
de5e5cd9b00be4d005d0e51c74084be6c07b0bbd
|
|
@ -0,0 +1 @@
|
|||
384cb98eb67b525b3b3e534c69cf53e0d8579499
|
|
@ -1 +0,0 @@
|
|||
796ca5e5a9af3cc21f50156fa7e614338ec15ceb
|
|
@ -0,0 +1 @@
|
|||
329975dde472be9e76f4f13d83869fddeef79354
|
|
@ -1 +0,0 @@
|
|||
7ba802083c4c97a07d9487c2b26ee39e4f8e3c7e
|
|
@ -0,0 +1 @@
|
|||
ab36aba4f7e725194db07c72388a1e064badea7b
|
|
@ -1 +0,0 @@
|
|||
d66adfdb3f330b726420db5f8db21b17a0d9991d
|
|
@ -0,0 +1 @@
|
|||
fecf827029d47ac96aa7ad31b3bdc0ef5d624fed
|
|
@ -1 +0,0 @@
|
|||
569c6362cb87858fc282fd786ba0fda0c44f0a8b
|
|
@ -0,0 +1 @@
|
|||
0940f5c7740b9e95d417ec7ab230196247aca1ac
|
|
@ -1 +0,0 @@
|
|||
0ba62e91082910b1057027b8912395da670105d0
|
|
@ -0,0 +1 @@
|
|||
83a509fb49c3933bf58a977e7b1b7e8f980af220
|
|
@ -1 +0,0 @@
|
|||
968e678dc4a236bbc8e4c2eb66f5702ea48aae10
|
|
@ -0,0 +1 @@
|
|||
87d04768126970eefb3803e41bbfb8951f7e25e4
|
|
@ -1 +0,0 @@
|
|||
579670cc27104fdbd627959b7982a99eab1d16d1
|
|
@ -0,0 +1 @@
|
|||
75614090f2a1422b1c385e049fffd2652bde4d3f
|
|
@ -1 +0,0 @@
|
|||
53f3fc06ed3357dc75d7b050172520aa86d41010
|
|
@ -0,0 +1 @@
|
|||
6a259acc9ba6d83f8091d282ef0b0ddff295c68f
|
|
@ -1 +0,0 @@
|
|||
5281aa095f4f46580ea2008ffd040733096d0246
|
|
@ -54,7 +54,6 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.ArrayList;
|
||||
import static org.elasticsearch.index.mapper.TypeParsers.parseDateTimeFormatter;
|
||||
|
||||
/** A {@link FieldMapper} for ip addresses. */
|
||||
|
@ -285,7 +284,7 @@ public class DateFieldMapper extends FieldMapper {
|
|||
}
|
||||
Query query = LongPoint.newRangeQuery(name(), l, u);
|
||||
if (hasDocValues()) {
|
||||
Query dvQuery = SortedNumericDocValuesField.newRangeQuery(name(), l, u);
|
||||
Query dvQuery = SortedNumericDocValuesField.newSlowRangeQuery(name(), l, u);
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
}
|
||||
return query;
|
||||
|
|
|
@ -211,7 +211,7 @@ public class NumberFieldMapper extends FieldMapper {
|
|||
}
|
||||
Query query = HalfFloatPoint.newRangeQuery(field, l, u);
|
||||
if (hasDocValues) {
|
||||
Query dvQuery = SortedNumericDocValuesField.newRangeQuery(field,
|
||||
Query dvQuery = SortedNumericDocValuesField.newSlowRangeQuery(field,
|
||||
HalfFloatPoint.halfFloatToSortableShort(l),
|
||||
HalfFloatPoint.halfFloatToSortableShort(u));
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
|
@ -307,7 +307,7 @@ public class NumberFieldMapper extends FieldMapper {
|
|||
}
|
||||
Query query = FloatPoint.newRangeQuery(field, l, u);
|
||||
if (hasDocValues) {
|
||||
Query dvQuery = SortedNumericDocValuesField.newRangeQuery(field,
|
||||
Query dvQuery = SortedNumericDocValuesField.newSlowRangeQuery(field,
|
||||
NumericUtils.floatToSortableInt(l),
|
||||
NumericUtils.floatToSortableInt(u));
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
|
@ -403,7 +403,7 @@ public class NumberFieldMapper extends FieldMapper {
|
|||
}
|
||||
Query query = DoublePoint.newRangeQuery(field, l, u);
|
||||
if (hasDocValues) {
|
||||
Query dvQuery = SortedNumericDocValuesField.newRangeQuery(field,
|
||||
Query dvQuery = SortedNumericDocValuesField.newSlowRangeQuery(field,
|
||||
NumericUtils.doubleToSortableLong(l),
|
||||
NumericUtils.doubleToSortableLong(u));
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
|
@ -660,7 +660,7 @@ public class NumberFieldMapper extends FieldMapper {
|
|||
}
|
||||
Query query = IntPoint.newRangeQuery(field, l, u);
|
||||
if (hasDocValues) {
|
||||
Query dvQuery = SortedNumericDocValuesField.newRangeQuery(field, l, u);
|
||||
Query dvQuery = SortedNumericDocValuesField.newSlowRangeQuery(field, l, u);
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
}
|
||||
return query;
|
||||
|
@ -790,7 +790,7 @@ public class NumberFieldMapper extends FieldMapper {
|
|||
}
|
||||
Query query = LongPoint.newRangeQuery(field, l, u);
|
||||
if (hasDocValues) {
|
||||
Query dvQuery = SortedNumericDocValuesField.newRangeQuery(field, l, u);
|
||||
Query dvQuery = SortedNumericDocValuesField.newSlowRangeQuery(field, l, u);
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
}
|
||||
return query;
|
||||
|
|
|
@ -350,7 +350,7 @@ public class GeoBoundingBoxQueryBuilder extends AbstractQueryBuilder<GeoBounding
|
|||
Query query = LatLonPoint.newBoxQuery(fieldType.name(), luceneBottomRight.getLat(), luceneTopLeft.getLat(),
|
||||
luceneTopLeft.getLon(), luceneBottomRight.getLon());
|
||||
if (fieldType.hasDocValues()) {
|
||||
Query dvQuery = LatLonDocValuesField.newBoxQuery(fieldType.name(),
|
||||
Query dvQuery = LatLonDocValuesField.newSlowBoxQuery(fieldType.name(),
|
||||
luceneBottomRight.getLat(), luceneTopLeft.getLat(),
|
||||
luceneTopLeft.getLon(), luceneBottomRight.getLon());
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
|
|
|
@ -251,7 +251,7 @@ public class GeoDistanceQueryBuilder extends AbstractQueryBuilder<GeoDistanceQue
|
|||
|
||||
Query query = LatLonPoint.newDistanceQuery(fieldType.name(), center.lat(), center.lon(), this.distance);
|
||||
if (fieldType.hasDocValues()) {
|
||||
Query dvQuery = LatLonDocValuesField.newDistanceQuery(fieldType.name(), center.lat(), center.lon(), this.distance);
|
||||
Query dvQuery = LatLonDocValuesField.newSlowDistanceQuery(fieldType.name(), center.lat(), center.lon(), this.distance);
|
||||
query = new IndexOrDocValuesQuery(query, dvQuery);
|
||||
}
|
||||
return query;
|
||||
|
|
|
@ -31,7 +31,7 @@ grant codeBase "${codebase.securesm-1.1.jar}" {
|
|||
//// Very special jar permissions:
|
||||
//// These are dangerous permissions that we don't want to grant to everything.
|
||||
|
||||
grant codeBase "${codebase.lucene-core-7.0.0-snapshot-ad2cb77.jar}" {
|
||||
grant codeBase "${codebase.lucene-core-7.0.0-snapshot-00142c9.jar}" {
|
||||
// needed to allow MMapDirectory's "unmap hack" (die unmap hack, die)
|
||||
// java 8 package
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
|
||||
|
@ -42,7 +42,7 @@ grant codeBase "${codebase.lucene-core-7.0.0-snapshot-ad2cb77.jar}" {
|
|||
permission java.lang.RuntimePermission "accessDeclaredMembers";
|
||||
};
|
||||
|
||||
grant codeBase "${codebase.lucene-misc-7.0.0-snapshot-ad2cb77.jar}" {
|
||||
grant codeBase "${codebase.lucene-misc-7.0.0-snapshot-00142c9.jar}" {
|
||||
// needed to allow shard shrinking to use hard-links if possible via lucenes HardlinkCopyDirectoryWrapper
|
||||
permission java.nio.file.LinkPermission "hard";
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@ grant codeBase "${codebase.securemock-1.2.jar}" {
|
|||
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
|
||||
};
|
||||
|
||||
grant codeBase "${codebase.lucene-test-framework-7.0.0-snapshot-ad2cb77.jar}" {
|
||||
grant codeBase "${codebase.lucene-test-framework-7.0.0-snapshot-00142c9.jar}" {
|
||||
// needed by RamUsageTester
|
||||
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
|
||||
// needed for testing hardlinks in StoreRecoveryTests since we install MockFS
|
||||
|
|
|
@ -177,7 +177,7 @@ public class DateFieldTypeTests extends FieldTypeTestCase {
|
|||
ft.setIndexOptions(IndexOptions.DOCS);
|
||||
Query expected = new IndexOrDocValuesQuery(
|
||||
LongPoint.newRangeQuery("field", instant, instant + 999),
|
||||
SortedNumericDocValuesField.newRangeQuery("field", instant, instant + 999));
|
||||
SortedNumericDocValuesField.newSlowRangeQuery("field", instant, instant + 999));
|
||||
assertEquals(expected, ft.termQuery(date, context));
|
||||
|
||||
ft.setIndexOptions(IndexOptions.NONE);
|
||||
|
@ -201,7 +201,7 @@ public class DateFieldTypeTests extends FieldTypeTestCase {
|
|||
ft.setIndexOptions(IndexOptions.DOCS);
|
||||
Query expected = new IndexOrDocValuesQuery(
|
||||
LongPoint.newRangeQuery("field", instant1, instant2),
|
||||
SortedNumericDocValuesField.newRangeQuery("field", instant1, instant2));
|
||||
SortedNumericDocValuesField.newSlowRangeQuery("field", instant1, instant2));
|
||||
assertEquals(expected,
|
||||
ft.rangeQuery(date1, date2, true, true, context).rewrite(new MultiReader()));
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ public class NumberFieldTypeTests extends FieldTypeTestCase {
|
|||
ft.setIndexOptions(IndexOptions.DOCS);
|
||||
Query expected = new IndexOrDocValuesQuery(
|
||||
LongPoint.newRangeQuery("field", 1, 3),
|
||||
SortedNumericDocValuesField.newRangeQuery("field", 1, 3));
|
||||
SortedNumericDocValuesField.newSlowRangeQuery("field", 1, 3));
|
||||
assertEquals(expected, ft.rangeQuery("1", "3", true, true, null));
|
||||
|
||||
ft.setIndexOptions(IndexOptions.NONE);
|
||||
|
|
|
@ -221,7 +221,7 @@ public class GeoBoundingBoxQueryBuilderTests extends AbstractQueryTestCase<GeoBo
|
|||
queryBuilder.topLeft().lon(),
|
||||
queryBuilder.bottomRight().lon()), indexQuery);
|
||||
Query dvQuery = ((IndexOrDocValuesQuery) query).getRandomAccessQuery();
|
||||
assertEquals(LatLonDocValuesField.newBoxQuery(queryBuilder.fieldName(),
|
||||
assertEquals(LatLonDocValuesField.newSlowBoxQuery(queryBuilder.fieldName(),
|
||||
queryBuilder.bottomRight().lat(),
|
||||
queryBuilder.topLeft().lat(),
|
||||
queryBuilder.topLeft().lon(),
|
||||
|
|
|
@ -136,7 +136,7 @@ public class GeoDistanceQueryBuilderTests extends AbstractQueryTestCase<GeoDista
|
|||
queryBuilder.distance()),
|
||||
indexQuery);
|
||||
Query dvQuery = ((IndexOrDocValuesQuery) query).getRandomAccessQuery();
|
||||
assertEquals(LatLonDocValuesField.newDistanceQuery(queryBuilder.fieldName(),
|
||||
assertEquals(LatLonDocValuesField.newSlowDistanceQuery(queryBuilder.fieldName(),
|
||||
queryBuilder.point().lat(),
|
||||
queryBuilder.point().lon(),
|
||||
queryBuilder.distance()),
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.lucene.document.SortedNumericDocValuesField;
|
|||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.search.FieldValueQuery;
|
||||
import org.apache.lucene.search.DocValuesFieldExistsQuery;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -64,7 +64,7 @@ public class CardinalityAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesSortedNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 7)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 1)));
|
||||
}, card -> {
|
||||
|
@ -73,7 +73,7 @@ public class CardinalityAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 7)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 1)));
|
||||
}, card -> {
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.lucene.document.SortedNumericDocValuesField;
|
|||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.search.FieldValueQuery;
|
||||
import org.apache.lucene.search.DocValuesFieldExistsQuery;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -63,7 +63,7 @@ public class MaxAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesSortedNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 7)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 1)));
|
||||
}, max -> {
|
||||
|
@ -72,7 +72,7 @@ public class MaxAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 7)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 1)));
|
||||
}, max -> {
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.lucene.document.SortedNumericDocValuesField;
|
|||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.search.FieldValueQuery;
|
||||
import org.apache.lucene.search.DocValuesFieldExistsQuery;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -61,7 +61,7 @@ public class AvgAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesSortedNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 7)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 2)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 3)));
|
||||
|
@ -71,7 +71,7 @@ public class AvgAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 7)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 2)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 3)));
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.lucene.document.SortedNumericDocValuesField;
|
|||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.search.FieldValueQuery;
|
||||
import org.apache.lucene.search.DocValuesFieldExistsQuery;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -63,7 +63,7 @@ public class HDRPercentilesAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesSortedNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 60)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 40)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 20)));
|
||||
|
@ -79,7 +79,7 @@ public class HDRPercentilesAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 60)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 40)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 20)));
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.lucene.document.SortedNumericDocValuesField;
|
|||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.search.FieldValueQuery;
|
||||
import org.apache.lucene.search.DocValuesFieldExistsQuery;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -63,7 +63,7 @@ public class TDigestPercentilesAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesSortedNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 8)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 5)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("number", 3)));
|
||||
|
@ -84,7 +84,7 @@ public class TDigestPercentilesAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery("number"), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery("number"), iw -> {
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 8)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 5)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField("number", 3)));
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.lucene.index.DirectoryReader;
|
|||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.apache.lucene.search.FieldValueQuery;
|
||||
import org.apache.lucene.search.DocValuesFieldExistsQuery;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -84,7 +84,7 @@ public class SumAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSortedNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery(FIELD_NAME), iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery(FIELD_NAME), iw -> {
|
||||
iw.addDocument(Arrays.asList(new SortedNumericDocValuesField(FIELD_NAME, 3),
|
||||
new SortedNumericDocValuesField(FIELD_NAME, 4)));
|
||||
iw.addDocument(Arrays.asList(new SortedNumericDocValuesField(FIELD_NAME, 3),
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.lucene.document.SortedNumericDocValuesField;
|
|||
import org.apache.lucene.index.DirectoryReader;
|
||||
import org.apache.lucene.index.IndexReader;
|
||||
import org.apache.lucene.index.RandomIndexWriter;
|
||||
import org.apache.lucene.search.FieldValueQuery;
|
||||
import org.apache.lucene.search.DocValuesFieldExistsQuery;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
import org.apache.lucene.search.MatchAllDocsQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -69,7 +69,7 @@ public class ValueCountAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesSortedNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery(FIELD_NAME), ValueType.NUMERIC, iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery(FIELD_NAME), ValueType.NUMERIC, iw -> {
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField("wrong_number", 7)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField(FIELD_NAME, 7)));
|
||||
iw.addDocument(singleton(new SortedNumericDocValuesField(FIELD_NAME, 1)));
|
||||
|
@ -77,7 +77,7 @@ public class ValueCountAggregatorTests extends AggregatorTestCase {
|
|||
}
|
||||
|
||||
public void testSomeMatchesNumericDocValues() throws IOException {
|
||||
testCase(new FieldValueQuery(FIELD_NAME), ValueType.NUMBER, iw -> {
|
||||
testCase(new DocValuesFieldExistsQuery(FIELD_NAME), ValueType.NUMBER, iw -> {
|
||||
iw.addDocument(singleton(new NumericDocValuesField(FIELD_NAME, 7)));
|
||||
iw.addDocument(singleton(new NumericDocValuesField(FIELD_NAME, 1)));
|
||||
}, count -> assertEquals(2L, count.getValue()));
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
f6d3cbab8f7548a3e30201e1d9da13b49672bfb9
|
|
@ -1 +0,0 @@
|
|||
6286fec3656b8e8153d33488094d92a134f77e3d
|
|
@ -67,4 +67,9 @@ final class ReplaceableConstDoubleValueSource extends DoubleValuesSource {
|
|||
public void setValue(double v) {
|
||||
fv.setValue(v);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
866c03b2ebb3afd88c36d61cbff2040109b4af84
|
|
@ -1 +0,0 @@
|
|||
f90e2fe9e8ff1be65a800e719d2a25cd0a09cced
|
|
@ -0,0 +1 @@
|
|||
2674ad43ba5e687047c0621e962d35c580dcd860
|
|
@ -1 +0,0 @@
|
|||
345ac08f374992ba70a4785c2cba5ec64b1f1cf5
|
|
@ -0,0 +1 @@
|
|||
837816bdda30c2e7837161341d670959ed44f94d
|
|
@ -1 +0,0 @@
|
|||
c50fc14d093c4ad9fbc8d6e457d855034e59456e
|
|
@ -0,0 +1 @@
|
|||
8e03047dcf8887da981c8d319c1d84c7d8f77d00
|
|
@ -1 +0,0 @@
|
|||
cc4e86b04a8654885d69e849513219aaa7358435
|
|
@ -0,0 +1 @@
|
|||
8bc911913715b8c692a13e2bcff1a9d92421c54f
|
|
@ -1 +0,0 @@
|
|||
b5ac4f79ef4b531e64ca19b22fc704cbd1618e6c
|
|
@ -0,0 +1 @@
|
|||
98182f4e9ea15177e9e04dda07eb6c0d34e11370
|
|
@ -1 +0,0 @@
|
|||
8a6fc7317cbebed963c5ee6ce48f7f62fbba3883
|
Loading…
Reference in New Issue