diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java index ae18cb59d95..e4c7906f215 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java @@ -76,7 +76,7 @@ public class DoubleTerms extends InternalMappedTerms, B exten } @Override - public List getBucketsInternal() { + public List getBuckets() { return buckets; } diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/InternalTerms.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/InternalTerms.java index 0fb4ceea33a..3834f9a65be 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/InternalTerms.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/InternalTerms.java @@ -40,15 +40,13 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import static java.util.Collections.unmodifiableList; - public abstract class InternalTerms, B extends InternalTerms.Bucket> extends InternalMultiBucketAggregation implements Terms, ToXContent { protected static final ParseField DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NAME = new ParseField("doc_count_error_upper_bound"); protected static final ParseField SUM_OF_OTHER_DOC_COUNTS = new ParseField("sum_other_doc_count"); - public abstract static class Bucket> extends Terms.Bucket { + public abstract static class Bucket> extends InternalMultiBucketAggregation.InternalBucket implements Terms.Bucket { /** * Reads a bucket. Should be a constructor reference. @@ -212,11 +210,7 @@ public abstract class InternalTerms, B extends Int protected abstract void writeTermTypeInfoTo(StreamOutput out) throws IOException; @Override - public final List getBuckets() { - return unmodifiableList(getBucketsInternal()); - } - - protected abstract List getBucketsInternal(); + public abstract List getBuckets(); @Override public abstract B getBucketByKey(String term); @@ -244,7 +238,7 @@ public abstract class InternalTerms, B extends Int } otherDocCount += terms.getSumOfOtherDocCounts(); final long thisAggDocCountError; - if (terms.getBucketsInternal().size() < getShardSize() || InternalOrder.isTermOrder(order)) { + if (terms.getBuckets().size() < getShardSize() || InternalOrder.isTermOrder(order)) { thisAggDocCountError = 0; } else if (InternalOrder.isCountDesc(this.order)) { if (terms.getDocCountError() > 0) { @@ -254,7 +248,7 @@ public abstract class InternalTerms, B extends Int } else { // otherwise use the doc count of the last term in the // aggregation - thisAggDocCountError = terms.getBucketsInternal().get(terms.getBucketsInternal().size() - 1).docCount; + thisAggDocCountError = terms.getBuckets().get(terms.getBuckets().size() - 1).docCount; } } else { thisAggDocCountError = -1; @@ -267,7 +261,7 @@ public abstract class InternalTerms, B extends Int } } setDocCountError(thisAggDocCountError); - for (B bucket : terms.getBucketsInternal()) { + for (B bucket : terms.getBuckets()) { // If there is already a doc count error for this bucket // subtract this aggs doc count error from it to make the // new value for the bucket. This then means that when the diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java index 98aa4825ee7..0de13a4d98f 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java @@ -76,7 +76,7 @@ public class LongTerms extends InternalMappedTerms } @Override - int compareTerm(Terms.Bucket other) { + public int compareTerm(Terms.Bucket other) { return Long.compare(term, ((Number) other.getKey()).longValue()); } @@ -161,7 +161,7 @@ public class LongTerms extends InternalMappedTerms * Converts a {@link LongTerms} into a {@link DoubleTerms}, returning the value of the specified long terms as doubles. */ static DoubleTerms convertLongTermsToDouble(LongTerms longTerms, DocValueFormat decimalFormat) { - List buckets = longTerms.getBuckets(); + List buckets = longTerms.getBuckets(); List newBuckets = new ArrayList<>(); for (Terms.Bucket bucket : buckets) { newBuckets.add(new DoubleTerms.Bucket(bucket.getKeyAsNumber().doubleValue(), diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java index b48c443fac9..049d996c08c 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java @@ -75,7 +75,7 @@ public class StringTerms extends InternalMappedTerms getBuckets(); + List getBuckets(); /** * Get the bucket for the given term, or null if there is no such bucket. diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/UnmappedTerms.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/UnmappedTerms.java index bdc95b2e87e..40cbacd37e6 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/UnmappedTerms.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/UnmappedTerms.java @@ -127,7 +127,7 @@ public class UnmappedTerms extends InternalTerms getBucketsInternal() { + public List getBuckets() { return emptyList(); } diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java index 7517e98ff27..c38552ae254 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java @@ -30,7 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.test.ESIntegTestCase; import org.hamcrest.Matchers; -import java.util.Collection; +import java.util.List; import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; @@ -95,7 +95,7 @@ public class CombiIT extends ESIntegTestCase { Terms terms = aggs.get("values"); assertNotNull(terms); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(values.size())); for (Terms.Bucket bucket : buckets) { values.remove(((Number) bucket.getKey()).intValue()); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java index 00f82dfbe44..6c08c169724 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java @@ -485,10 +485,10 @@ public class EquivalenceIT extends ESIntegTestCase { } private void assertEquals(Terms t1, Terms t2) { - List t1Buckets = t1.getBuckets(); - List t2Buckets = t1.getBuckets(); + List t1Buckets = t1.getBuckets(); + List t2Buckets = t1.getBuckets(); assertEquals(t1Buckets.size(), t2Buckets.size()); - for (Iterator it1 = t1Buckets.iterator(), it2 = t2Buckets.iterator(); it1.hasNext(); ) { + for (Iterator it1 = t1Buckets.iterator(), it2 = t2Buckets.iterator(); it1.hasNext(); ) { final Terms.Bucket b1 = it1.next(); final Terms.Bucket b2 = it2.next(); assertEquals(b1.getDocCount(), b2.getDocCount()); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java index 9af28806fef..c8803b7e790 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java @@ -32,6 +32,7 @@ import org.elasticsearch.search.aggregations.metrics.max.Max; import org.elasticsearch.test.ESIntegTestCase; import java.util.Collection; +import java.util.List; import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_REPLICAS; import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_SHARDS; @@ -108,7 +109,7 @@ public class DiversifiedSamplerIT extends ESIntegTestCase { ).execute().actionGet(); assertSearchResponse(response); Terms genres = response.getAggregations().get("genres"); - Collection genreBuckets = genres.getBuckets(); + Collection genreBuckets = genres.getBuckets(); // For this test to be useful we need >1 genre bucket to compare assertThat(genreBuckets.size(), greaterThan(1)); double lastMaxPrice = asc ? Double.MIN_VALUE : Double.MAX_VALUE; @@ -141,7 +142,7 @@ public class DiversifiedSamplerIT extends ESIntegTestCase { assertSearchResponse(response); Sampler sample = response.getAggregations().get("sample"); Terms authors = sample.getAggregations().get("authors"); - Collection testBuckets = authors.getBuckets(); + List testBuckets = authors.getBuckets(); for (Terms.Bucket testBucket : testBuckets) { assertThat(testBucket.getDocCount(), lessThanOrEqualTo((long) NUM_SHARDS * MAX_DOCS_PER_AUTHOR)); @@ -162,11 +163,11 @@ public class DiversifiedSamplerIT extends ESIntegTestCase { .addAggregation(rootTerms).execute().actionGet(); assertSearchResponse(response); Terms genres = response.getAggregations().get("genres"); - Collection genreBuckets = genres.getBuckets(); + List genreBuckets = genres.getBuckets(); for (Terms.Bucket genreBucket : genreBuckets) { Sampler sample = genreBucket.getAggregations().get("sample"); Terms authors = sample.getAggregations().get("authors"); - Collection testBuckets = authors.getBuckets(); + List testBuckets = authors.getBuckets(); for (Terms.Bucket testBucket : testBuckets) { assertThat(testBucket.getDocCount(), lessThanOrEqualTo((long) NUM_SHARDS * MAX_DOCS_PER_AUTHOR)); @@ -195,7 +196,7 @@ public class DiversifiedSamplerIT extends ESIntegTestCase { Sampler sample = genreSample.getAggregations().get("sample"); Terms genres = sample.getAggregations().get("genres"); - Collection testBuckets = genres.getBuckets(); + List testBuckets = genres.getBuckets(); for (Terms.Bucket testBucket : testBuckets) { assertThat(testBucket.getDocCount(), lessThanOrEqualTo((long) NUM_SHARDS * MAX_DOCS_PER_GENRE)); } diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java index cf28541121c..ca106721fcc 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java @@ -842,7 +842,7 @@ public class DoubleTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("num_tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); Terms.Bucket tag = iters.next(); assertThat(tag, notNullValue()); @@ -883,7 +883,7 @@ public class DoubleTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); // the max for "1" is 2 // the max for "0" is 4 diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java index 6793768a91f..a54dc3e2f5e 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java @@ -854,7 +854,7 @@ public class LongTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("num_tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); Terms.Bucket tag = iters.next(); assertThat(tag, notNullValue()); @@ -893,7 +893,7 @@ public class LongTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); // the max for "1" is 2 // the max for "0" is 4 diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java index 7307b756e3f..e1e8f1ba660 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java @@ -161,8 +161,8 @@ public class MinDocCountIT extends AbstractTermsTestCase { // check that terms2 is a subset of terms1 private void assertSubset(Terms terms1, Terms terms2, long minDocCount, int size, String include) { final Matcher matcher = include == null ? null : Pattern.compile(include).matcher("");; - final Iterator it1 = terms1.getBuckets().iterator(); - final Iterator it2 = terms2.getBuckets().iterator(); + final Iterator it1 = terms1.getBuckets().iterator(); + final Iterator it2 = terms2.getBuckets().iterator(); int size2 = 0; while (it1.hasNext()) { final Terms.Bucket bucket1 = it1.next(); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java index f87b98bc878..ebd078de674 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java @@ -31,6 +31,7 @@ import org.elasticsearch.search.aggregations.metrics.max.Max; import org.elasticsearch.test.ESIntegTestCase; import java.util.Collection; +import java.util.List; import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_REPLICAS; import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_SHARDS; @@ -104,7 +105,7 @@ public class SamplerIT extends ESIntegTestCase { ).execute().actionGet(); assertSearchResponse(response); Terms genres = response.getAggregations().get("genres"); - Collection genreBuckets = genres.getBuckets(); + List genreBuckets = genres.getBuckets(); // For this test to be useful we need >1 genre bucket to compare assertThat(genreBuckets.size(), greaterThan(1)); double lastMaxPrice = asc ? Double.MIN_VALUE : Double.MAX_VALUE; @@ -130,7 +131,7 @@ public class SamplerIT extends ESIntegTestCase { assertSearchResponse(response); Sampler sample = response.getAggregations().get("sample"); Terms authors = sample.getAggregations().get("authors"); - Collection testBuckets = authors.getBuckets(); + List testBuckets = authors.getBuckets(); long maxBooksPerAuthor = 0; for (Terms.Bucket testBucket : testBuckets) { diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java index ecc16b85f13..748c5f886f6 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java @@ -22,8 +22,8 @@ import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import java.util.Collection; import java.util.HashMap; +import java.util.List; import java.util.Map; import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; @@ -43,7 +43,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put("1", 8L); @@ -66,7 +66,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put("1", 8L); @@ -90,7 +90,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); // we still only return 3 entries (based on the 'size' param) Map expected = new HashMap<>(); expected.put("1", 8L); @@ -114,7 +114,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); // we still only return 3 entries (based on the 'size' param) Map expected = new HashMap<>(); expected.put("1", 5L); @@ -137,7 +137,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put("1", 8L); @@ -160,7 +160,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 8L); @@ -183,7 +183,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 8L); @@ -206,7 +206,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); // we still only return 3 entries (based on the 'size' param) Map expected = new HashMap<>(); expected.put(1, 8L); @@ -230,7 +230,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); // we still only return 3 entries (based on the 'size' param) Map expected = new HashMap<>(); expected.put(1, 5L); @@ -253,7 +253,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 8L); @@ -276,7 +276,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 8L); @@ -299,7 +299,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 8L); @@ -322,7 +322,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 8L); @@ -345,7 +345,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 5L); @@ -368,7 +368,7 @@ public class ShardSizeTermsIT extends ShardSizeTestCase { .execute().actionGet(); Terms terms = response.getAggregations().get("keys"); - Collection buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(3)); Map expected = new HashMap<>(); expected.put(1, 8L); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java index 7fc20908e81..09cec9a458f 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java @@ -438,7 +438,7 @@ public class SignificantTermsSignificanceScoreIT extends ESIntegTestCase { assertSearchResponse(response); StringTerms classes = response.getAggregations().get("class"); assertThat(classes.getBuckets().size(), equalTo(2)); - Iterator classBuckets = classes.getBuckets().iterator(); + Iterator classBuckets = classes.getBuckets().iterator(); Aggregations aggregations = classBuckets.next().getAggregations(); SignificantTerms sigTerms = aggregations.get("mySignificantTerms"); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsIT.java index b5dbcd9085a..df69cfcfa93 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsIT.java @@ -1012,7 +1012,7 @@ public class StringTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); Terms.Bucket tag = iters.next(); assertThat(tag, notNullValue()); @@ -1054,7 +1054,7 @@ public class StringTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); // the max for "more" is 2 // the max for "less" is 4 @@ -1117,7 +1117,7 @@ public class StringTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); // the max for "more" is 2 // the max for "less" is 4 @@ -1180,7 +1180,7 @@ public class StringTermsIT extends AbstractTermsTestCase { assertThat(tags.getName(), equalTo("tags")); assertThat(tags.getBuckets().size(), equalTo(2)); - Iterator iters = tags.getBuckets().iterator(); + Iterator iters = tags.getBuckets().iterator(); // the max for "more" is 2 // the max for "less" is 4 diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java index 9d5ca3afc54..9ed32ca2e7b 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java @@ -177,7 +177,7 @@ public class TermsDocCountErrorIT extends ESIntegTestCase { assertThat(testTerms, notNullValue()); assertThat(testTerms.getName(), equalTo("terms")); assertThat(testTerms.getDocCountError(), greaterThanOrEqualTo(0L)); - Collection testBuckets = testTerms.getBuckets(); + List testBuckets = testTerms.getBuckets(); assertThat(testBuckets.size(), lessThanOrEqualTo(size)); assertThat(accurateTerms.getBuckets().size(), greaterThanOrEqualTo(testBuckets.size())); @@ -211,7 +211,7 @@ public class TermsDocCountErrorIT extends ESIntegTestCase { assertThat(testTerms, notNullValue()); assertThat(testTerms.getName(), equalTo("terms")); assertThat(testTerms.getDocCountError(), equalTo(0L)); - Collection testBuckets = testTerms.getBuckets(); + List testBuckets = testTerms.getBuckets(); assertThat(testBuckets.size(), lessThanOrEqualTo(size)); assertThat(accurateTerms.getBuckets().size(), greaterThanOrEqualTo(testBuckets.size())); @@ -229,7 +229,7 @@ public class TermsDocCountErrorIT extends ESIntegTestCase { assertThat(testTerms, notNullValue()); assertThat(testTerms.getName(), equalTo("terms")); assertThat(testTerms.getDocCountError(), equalTo(0L)); - Collection testBuckets = testTerms.getBuckets(); + List testBuckets = testTerms.getBuckets(); assertThat(testBuckets.size(), lessThanOrEqualTo(size)); for (Terms.Bucket testBucket : testBuckets) { @@ -248,7 +248,7 @@ public class TermsDocCountErrorIT extends ESIntegTestCase { assertThat(testTerms, notNullValue()); assertThat(testTerms.getName(), equalTo("terms")); assertThat(testTerms.getDocCountError(),anyOf(equalTo(-1L), equalTo(0L))); - Collection testBuckets = testTerms.getBuckets(); + List testBuckets = testTerms.getBuckets(); assertThat(testBuckets.size(), lessThanOrEqualTo(size)); assertThat(accurateTerms.getBuckets().size(), greaterThanOrEqualTo(testBuckets.size())); @@ -988,7 +988,7 @@ public class TermsDocCountErrorIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getDocCountError(), equalTo(46L)); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(5)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/TermsAggregatorTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/TermsAggregatorTests.java index f2977fd7692..1648d8ede9f 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/TermsAggregatorTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/TermsAggregatorTests.java @@ -136,7 +136,7 @@ public class TermsAggregatorTests extends AggregatorTestCase { InternalAggregation mergedAggs = internalAgg.doReduce(aggs, ctx); assertTrue(mergedAggs instanceof DoubleTerms); long expected = numLongs + numDoubles; - List buckets = ((DoubleTerms) mergedAggs).getBuckets(); + List buckets = ((DoubleTerms) mergedAggs).getBuckets(); assertEquals(4, buckets.size()); assertEquals("1.0", buckets.get(0).getKeyAsString()); assertEquals(expected, buckets.get(0).getDocCount()); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java index 2e2aa9657d8..b7739d6c816 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java @@ -334,7 +334,7 @@ public class AvgIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java index 7de7bb0f315..3903dd8b0bc 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java @@ -604,7 +604,7 @@ public class ExtendedStatsIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java index e4444571a31..1a97cb49164 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java @@ -233,7 +233,7 @@ public class GeoBoundsIT extends AbstractGeoTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(10)); for (int i = 0; i < 10; i++) { Bucket bucket = buckets.get(i); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java index 0aef20bca6d..5b56e6b7efb 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java @@ -515,7 +515,7 @@ public class HDRPercentileRanksIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java index d3531da9250..56fb14402ad 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java @@ -506,7 +506,7 @@ public class HDRPercentilesIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxIT.java index 5c9e14c3453..03eb9a09237 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxIT.java @@ -336,7 +336,7 @@ public class MaxIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinIT.java index 2b517b64fa1..cba2ba9eb97 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinIT.java @@ -348,7 +348,7 @@ public class MinIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java index 85db6166307..9231f093963 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java @@ -455,7 +455,7 @@ public class StatsIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java index 1591e6df931..16d345c7b84 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java @@ -333,7 +333,7 @@ public class SumIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java index 057731e275a..f1943747ceb 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java @@ -466,7 +466,7 @@ public class TDigestPercentileRanksIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java index d81ca004b97..2589e9977a6 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java @@ -451,7 +451,7 @@ public class TDigestPercentilesIT extends AbstractNumericTestCase { Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java index aeef44d6272..e9b9ae20407 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java @@ -519,9 +519,9 @@ public class TopHitsIT extends ESIntegTestCase { SearchHits hits = topHits.getHits(); assertThat(hits.getTotalHits(), equalTo(10L)); assertThat(hits.getHits().length, equalTo(3)); - assertThat((Long) hits.getAt(0).getSortValues()[0], equalTo(higestSortValue)); - assertThat((Long) hits.getAt(1).getSortValues()[0], equalTo(higestSortValue - 1)); - assertThat((Long) hits.getAt(2).getSortValues()[0], equalTo(higestSortValue - 2)); + assertThat(hits.getAt(0).getSortValues()[0], equalTo(higestSortValue)); + assertThat(hits.getAt(1).getSortValues()[0], equalTo(higestSortValue - 1)); + assertThat(hits.getAt(2).getSortValues()[0], equalTo(higestSortValue - 2)); Max max = bucket.getAggregations().get("max_sort"); assertThat(max.getValue(), equalTo(((Long) higestSortValue).doubleValue())); higestSortValue -= 10; @@ -544,7 +544,7 @@ public class TopHitsIT extends ESIntegTestCase { assertThat(terms.getName(), equalTo("terms")); assertThat(terms.getBuckets().size(), equalTo(3)); - Iterator bucketIterator = terms.getBuckets().iterator(); + Iterator bucketIterator = terms.getBuckets().iterator(); Terms.Bucket bucket = bucketIterator.next(); assertThat(key(bucket), equalTo("b")); TopHits topHits = bucket.getAggregations().get("hits"); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java index d62e93fa5e9..4f6ff0e32ed 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java @@ -140,7 +140,7 @@ public class AvgBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -182,7 +182,7 @@ public class AvgBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); double bucketSum = 0; @@ -223,7 +223,7 @@ public class AvgBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -277,7 +277,7 @@ public class AvgBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -322,7 +322,7 @@ public class AvgBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); InternalSimpleValue avgBucketValue = response.getAggregations().get("avg_bucket"); @@ -349,7 +349,7 @@ public class AvgBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); double aggTermsSum = 0; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java index d4310e581c0..607124ecb15 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java @@ -211,7 +211,7 @@ public class ExtendedStatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -262,7 +262,7 @@ public class ExtendedStatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); double bucketSum = 0; @@ -312,7 +312,7 @@ public class ExtendedStatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -375,7 +375,7 @@ public class ExtendedStatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -429,7 +429,7 @@ public class ExtendedStatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); ExtendedStatsBucket extendedStatsBucketValue = response.getAggregations().get("extended_stats_bucket"); @@ -487,7 +487,7 @@ public class ExtendedStatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); double aggTermsSum = 0; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java index aba941ebb4b..632f11f7ec7 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java @@ -149,7 +149,7 @@ public class MaxBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -196,7 +196,7 @@ public class MaxBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); List maxKeys = new ArrayList<>(); @@ -242,7 +242,7 @@ public class MaxBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -348,7 +348,7 @@ public class MaxBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -397,7 +397,7 @@ public class MaxBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); InternalBucketMetricValue maxBucketValue = response.getAggregations().get("max_bucket"); @@ -425,7 +425,7 @@ public class MaxBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); List maxTermsKeys = new ArrayList<>(); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java index cbd6824b3a4..04fdd0c3133 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java @@ -146,7 +146,7 @@ public class MinBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -193,7 +193,7 @@ public class MinBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); List minKeys = new ArrayList<>(); @@ -239,7 +239,7 @@ public class MinBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -298,7 +298,7 @@ public class MinBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -347,7 +347,7 @@ public class MinBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); InternalBucketMetricValue minBucketValue = response.getAggregations().get("min_bucket"); @@ -375,7 +375,7 @@ public class MinBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); List minTermsKeys = new ArrayList<>(); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java index c582c76bd8c..e23e5441431 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java @@ -145,7 +145,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -187,7 +187,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); double[] values = new double[interval]; @@ -220,7 +220,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); double[] values = new double[interval]; @@ -261,7 +261,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -316,7 +316,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -361,7 +361,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); PercentilesBucket percentilesBucketValue = response.getAggregations().get("percentiles_bucket"); @@ -384,7 +384,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); PercentilesBucket percentilesBucketValue = response.getAggregations().get("percentiles_bucket"); @@ -479,7 +479,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); double[] values = new double[termsBuckets.size()]; @@ -539,7 +539,7 @@ public class PercentilesBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); double[] values = new double[termsBuckets.size()]; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java index c38dc99bdf9..231005f1b5b 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java @@ -147,7 +147,7 @@ public class StatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -195,7 +195,7 @@ public class StatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); double bucketSum = 0; @@ -242,7 +242,7 @@ public class StatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -302,7 +302,7 @@ public class StatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -353,7 +353,7 @@ public class StatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); StatsBucket statsBucketValue = response.getAggregations().get("stats_bucket"); @@ -380,7 +380,7 @@ public class StatsBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); double aggTermsSum = 0; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java index 09582430046..048dfac8648 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java @@ -137,7 +137,7 @@ public class SumBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -176,7 +176,7 @@ public class SumBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(interval)); double bucketSum = 0; @@ -214,7 +214,7 @@ public class SumBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -265,7 +265,7 @@ public class SumBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); for (int i = 0; i < interval; ++i) { @@ -307,7 +307,7 @@ public class SumBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List buckets = terms.getBuckets(); + List buckets = terms.getBuckets(); assertThat(buckets.size(), equalTo(0)); InternalSimpleValue sumBucketValue = response.getAggregations().get("sum_bucket"); @@ -334,7 +334,7 @@ public class SumBucketIT extends ESIntegTestCase { Terms terms = response.getAggregations().get("terms"); assertThat(terms, notNullValue()); assertThat(terms.getName(), equalTo("terms")); - List termsBuckets = terms.getBuckets(); + List termsBuckets = terms.getBuckets(); assertThat(termsBuckets.size(), equalTo(interval)); double aggTermsSum = 0;