|
@@ -41,8 +41,7 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
public void testResolveToAgg() {
|
|
|
AggregationPath path = AggregationPath.parse("the_avg");
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(agg));
|
|
|
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(1, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -55,8 +54,7 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
public void testResolveToAggValue() {
|
|
|
AggregationPath path = AggregationPath.parse("the_avg.value");
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(agg));
|
|
|
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(1, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -69,8 +67,7 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
public void testResolveToNothing() {
|
|
|
AggregationPath path = AggregationPath.parse("foo.value");
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(agg));
|
|
|
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(1, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -84,8 +81,7 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
public void testResolveToUnknown() {
|
|
|
AggregationPath path = AggregationPath.parse("the_avg.unknown");
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(agg));
|
|
|
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(1, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -99,8 +95,7 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
public void testResolveToBucketCount() {
|
|
|
AggregationPath path = AggregationPath.parse("_bucket_count");
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(agg));
|
|
|
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(1, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -113,8 +108,7 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
public void testResolveToCount() {
|
|
|
AggregationPath path = AggregationPath.parse("_count");
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(agg));
|
|
|
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(1, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -127,8 +121,7 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
public void testResolveToKey() {
|
|
|
AggregationPath path = AggregationPath.parse("_key");
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(agg));
|
|
|
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(19, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -142,14 +135,13 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
AggregationPath path = AggregationPath.parse("string_terms['foo']>the_avg.value");
|
|
|
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalStringAggs = new InternalAggregations(Collections.singletonList(agg));
|
|
|
List<StringTerms.Bucket> stringBuckets = Collections.singletonList(new StringTerms.Bucket(
|
|
|
new BytesRef("foo".getBytes(StandardCharsets.UTF_8), 0, "foo".getBytes(StandardCharsets.UTF_8).length), 1,
|
|
|
internalStringAggs, false, 0, DocValueFormat.RAW));
|
|
|
|
|
|
- InternalTerms termsAgg = new StringTerms("string_terms", BucketOrder.count(false), 1, 0, Collections.emptyList(),
|
|
|
+ InternalTerms termsAgg = new StringTerms("string_terms", BucketOrder.count(false), 1, 0,
|
|
|
Collections.emptyMap(), DocValueFormat.RAW, 1, false, 0, stringBuckets, 0);
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(termsAgg));
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(19, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|
|
@@ -163,14 +155,13 @@ public class InternalMultiBucketAggregationTests extends ESTestCase {
|
|
|
AggregationPath path = AggregationPath.parse("string_terms['bar']>the_avg.value");
|
|
|
|
|
|
List<LongTerms.Bucket> buckets = new ArrayList<>();
|
|
|
- InternalAggregation agg = new InternalAvg("the_avg", 2, 1,
|
|
|
- DocValueFormat.RAW, Collections.emptyList(), Collections.emptyMap());
|
|
|
+ InternalAggregation agg = new InternalAvg("the_avg", 2, 1, DocValueFormat.RAW, Collections.emptyMap());
|
|
|
InternalAggregations internalStringAggs = new InternalAggregations(Collections.singletonList(agg));
|
|
|
List<StringTerms.Bucket> stringBuckets = Collections.singletonList(new StringTerms.Bucket(
|
|
|
new BytesRef("foo".getBytes(StandardCharsets.UTF_8), 0, "foo".getBytes(StandardCharsets.UTF_8).length), 1,
|
|
|
internalStringAggs, false, 0, DocValueFormat.RAW));
|
|
|
|
|
|
- InternalTerms termsAgg = new StringTerms("string_terms", BucketOrder.count(false), 1, 0, Collections.emptyList(),
|
|
|
+ InternalTerms termsAgg = new StringTerms("string_terms", BucketOrder.count(false), 1, 0,
|
|
|
Collections.emptyMap(), DocValueFormat.RAW, 1, false, 0, stringBuckets, 0);
|
|
|
InternalAggregations internalAggregations = new InternalAggregations(Collections.singletonList(termsAgg));
|
|
|
LongTerms.Bucket bucket = new LongTerms.Bucket(19, 1, internalAggregations, false, 0, DocValueFormat.RAW);
|