From f0dd7577fac0238bb6b7393b3d12ab3dcca3ca19 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 26 Oct 2023 21:07:57 +0200 Subject: [PATCH] iter --- .../elasticsearch/search/SearchServiceTests.java | 5 +++-- .../aggregations/AggregatorFactoriesTests.java | 14 -------------- .../search/builder/SearchSourceBuilderTests.java | 6 ------ 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java b/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java index ae462d9115abf..d70c08a745ca3 100644 --- a/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java +++ b/server/src/test/java/org/elasticsearch/search/SearchServiceTests.java @@ -85,6 +85,7 @@ import org.elasticsearch.search.aggregations.bucket.filter.FiltersAggregationBuilder; import org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder; import org.elasticsearch.search.aggregations.bucket.range.DateRangeAggregationBuilder; +import org.elasticsearch.search.aggregations.bucket.terms.SignificantTermsAggregationBuilder; import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; import org.elasticsearch.search.aggregations.support.AggregationContext; import org.elasticsearch.search.aggregations.support.ValueType; @@ -2231,7 +2232,7 @@ public void testIsParallelCollectionSupportedForResults() throws Exception { ); SearchSourceBuilder searchSourceAggDoesNotSupportParallelCollection = new SearchSourceBuilder(); - searchSourceAggDoesNotSupportParallelCollection.aggregation(new TermsAggregationBuilder("terms")); + searchSourceAggDoesNotSupportParallelCollection.aggregation(new SignificantTermsAggregationBuilder("terms")); assertFalse( "Parallel collection should not be supported for the query phase when " + "enabled && does not contains supported agg.", @@ -2243,7 +2244,7 @@ public void testIsParallelCollectionSupportedForResults() throws Exception { ); SearchSourceBuilder searchSourceMultiAggDoesNotSupportParallelCollection = new SearchSourceBuilder(); - searchSourceMultiAggDoesNotSupportParallelCollection.aggregation(new TermsAggregationBuilder("terms")); + searchSourceMultiAggDoesNotSupportParallelCollection.aggregation(new SignificantTermsAggregationBuilder("terms")); searchSourceMultiAggDoesNotSupportParallelCollection.aggregation(new DateRangeAggregationBuilder("dateRange")); assertFalse( "Parallel collection should not be supported for the query phase when when enabled && contains unsupported agg.", diff --git a/server/src/test/java/org/elasticsearch/search/aggregations/AggregatorFactoriesTests.java b/server/src/test/java/org/elasticsearch/search/aggregations/AggregatorFactoriesTests.java index d67e99e4521f1..87343450fe0be 100644 --- a/server/src/test/java/org/elasticsearch/search/aggregations/AggregatorFactoriesTests.java +++ b/server/src/test/java/org/elasticsearch/search/aggregations/AggregatorFactoriesTests.java @@ -28,7 +28,6 @@ import org.elasticsearch.search.aggregations.bucket.composite.TermsValuesSourceBuilder; import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder; import org.elasticsearch.search.aggregations.bucket.nested.NestedAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; import org.elasticsearch.search.aggregations.metrics.CardinalityAggregationBuilder; import org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder; import org.elasticsearch.search.aggregations.pipeline.BucketScriptPipelineAggregationBuilder; @@ -318,19 +317,6 @@ public void testBuildPipelineTreeResolvesPipelineOrder() { } public void testSupportsParallelCollection() { - { - AggregatorFactories.Builder builder = new AggregatorFactories.Builder(); - assertTrue(builder.supportsParallelCollection()); - builder.addAggregator(new FilterAggregationBuilder("name", new MatchAllQueryBuilder())); - assertTrue(builder.supportsParallelCollection()); - builder.addAggregator(new TermsAggregationBuilder("terms")); - assertFalse(builder.supportsParallelCollection()); - } - { - AggregatorFactories.Builder builder = new AggregatorFactories.Builder(); - builder.addAggregator(new TermsAggregationBuilder("terms")); - assertFalse(builder.supportsParallelCollection()); - } { AggregatorFactories.Builder builder = new AggregatorFactories.Builder(); builder.addAggregator(new CardinalityAggregationBuilder("cardinality")); diff --git a/server/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java b/server/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java index 85f6d0a718e48..5c5d720bc61df 100644 --- a/server/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java +++ b/server/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTests.java @@ -914,12 +914,6 @@ public void testSupportsParallelCollection() { SearchSourceBuilder searchSourceBuilder = newSearchSourceBuilder.get(); searchSourceBuilder.aggregation(new MaxAggregationBuilder("max")); assertTrue(searchSourceBuilder.supportsParallelCollection()); - - } - { - SearchSourceBuilder searchSourceBuilder = newSearchSourceBuilder.get(); - searchSourceBuilder.aggregation(new TermsAggregationBuilder("terms")); - assertFalse(searchSourceBuilder.supportsParallelCollection()); } { SearchSourceBuilder searchSourceBuilder = newSearchSourceBuilder.get();