Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Oct 26, 2023
1 parent d493007 commit f0dd757
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.",
Expand All @@ -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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f0dd757

Please sign in to comment.