@@ -70,10 +70,17 @@ public class SignificantTermsAggregatorFactory extends ValuesSourceAggregatorFac
7070 private final TermsAggregator .BucketCountThresholds bucketCountThresholds ;
7171 private final SignificanceHeuristic significanceHeuristic ;
7272
73- public SignificantTermsAggregatorFactory (String name , ValuesSourceConfig <ValuesSource > config , IncludeExclude includeExclude ,
74- String executionHint , QueryBuilder filterBuilder , TermsAggregator .BucketCountThresholds bucketCountThresholds ,
75- SignificanceHeuristic significanceHeuristic , SearchContext context , AggregatorFactory <?> parent ,
76- AggregatorFactories .Builder subFactoriesBuilder , Map <String , Object > metaData ) throws IOException {
73+ public SignificantTermsAggregatorFactory (String name ,
74+ ValuesSourceConfig <ValuesSource > config ,
75+ IncludeExclude includeExclude ,
76+ String executionHint ,
77+ QueryBuilder filterBuilder ,
78+ TermsAggregator .BucketCountThresholds bucketCountThresholds ,
79+ SignificanceHeuristic significanceHeuristic ,
80+ SearchContext context ,
81+ AggregatorFactory <?> parent ,
82+ AggregatorFactories .Builder subFactoriesBuilder ,
83+ Map <String , Object > metaData ) throws IOException {
7784 super (name , config , context , parent , subFactoriesBuilder , metaData );
7885 this .includeExclude = includeExclude ;
7986 this .executionHint = executionHint ;
@@ -246,44 +253,71 @@ public enum ExecutionMode {
246253 MAP (new ParseField ("map" )) {
247254
248255 @ Override
249- Aggregator create (String name , AggregatorFactories factories , ValuesSource valuesSource , DocValueFormat format ,
250- TermsAggregator .BucketCountThresholds bucketCountThresholds , IncludeExclude includeExclude ,
251- SearchContext aggregationContext , Aggregator parent , SignificanceHeuristic significanceHeuristic ,
252- SignificantTermsAggregatorFactory termsAggregatorFactory , List <PipelineAggregator > pipelineAggregators ,
253- Map <String , Object > metaData ) throws IOException {
256+ Aggregator create (String name ,
257+ AggregatorFactories factories ,
258+ ValuesSource valuesSource ,
259+ DocValueFormat format ,
260+ TermsAggregator .BucketCountThresholds bucketCountThresholds ,
261+ IncludeExclude includeExclude ,
262+ SearchContext aggregationContext ,
263+ Aggregator parent ,
264+ SignificanceHeuristic significanceHeuristic ,
265+ SignificantTermsAggregatorFactory termsAggregatorFactory ,
266+ List <PipelineAggregator > pipelineAggregators ,
267+ Map <String , Object > metaData ) throws IOException {
268+
254269 final IncludeExclude .StringFilter filter = includeExclude == null ? null : includeExclude .convertToStringFilter (format );
255270 return new SignificantStringTermsAggregator (name , factories , valuesSource , format , bucketCountThresholds , filter ,
256271 aggregationContext , parent , significanceHeuristic , termsAggregatorFactory , pipelineAggregators , metaData );
272+
257273 }
258274
259275 },
260276 GLOBAL_ORDINALS (new ParseField ("global_ordinals" )) {
261277
262278 @ Override
263- Aggregator create (String name , AggregatorFactories factories , ValuesSource valuesSource , DocValueFormat format ,
264- TermsAggregator .BucketCountThresholds bucketCountThresholds , IncludeExclude includeExclude ,
265- SearchContext aggregationContext , Aggregator parent , SignificanceHeuristic significanceHeuristic ,
266- SignificantTermsAggregatorFactory termsAggregatorFactory , List <PipelineAggregator > pipelineAggregators ,
267- Map <String , Object > metaData ) throws IOException {
279+ Aggregator create (String name ,
280+ AggregatorFactories factories ,
281+ ValuesSource valuesSource ,
282+ DocValueFormat format ,
283+ TermsAggregator .BucketCountThresholds bucketCountThresholds ,
284+ IncludeExclude includeExclude ,
285+ SearchContext aggregationContext ,
286+ Aggregator parent ,
287+ SignificanceHeuristic significanceHeuristic ,
288+ SignificantTermsAggregatorFactory termsAggregatorFactory ,
289+ List <PipelineAggregator > pipelineAggregators ,
290+ Map <String , Object > metaData ) throws IOException {
291+
268292 final IncludeExclude .OrdinalsFilter filter = includeExclude == null ? null : includeExclude .convertToOrdinalsFilter (format );
269293 return new GlobalOrdinalsSignificantTermsAggregator (name , factories ,
270294 (ValuesSource .Bytes .WithOrdinals .FieldData ) valuesSource , format , bucketCountThresholds , filter ,
271- aggregationContext , parent , significanceHeuristic , termsAggregatorFactory , pipelineAggregators , metaData );
295+ aggregationContext , parent , false , significanceHeuristic , termsAggregatorFactory , pipelineAggregators , metaData );
296+
272297 }
273298
274299 },
275300 GLOBAL_ORDINALS_HASH (new ParseField ("global_ordinals_hash" )) {
276301
277302 @ Override
278- Aggregator create (String name , AggregatorFactories factories , ValuesSource valuesSource , DocValueFormat format ,
279- TermsAggregator .BucketCountThresholds bucketCountThresholds , IncludeExclude includeExclude ,
280- SearchContext aggregationContext , Aggregator parent , SignificanceHeuristic significanceHeuristic ,
281- SignificantTermsAggregatorFactory termsAggregatorFactory , List <PipelineAggregator > pipelineAggregators ,
282- Map <String , Object > metaData ) throws IOException {
303+ Aggregator create (String name ,
304+ AggregatorFactories factories ,
305+ ValuesSource valuesSource ,
306+ DocValueFormat format ,
307+ TermsAggregator .BucketCountThresholds bucketCountThresholds ,
308+ IncludeExclude includeExclude ,
309+ SearchContext aggregationContext ,
310+ Aggregator parent ,
311+ SignificanceHeuristic significanceHeuristic ,
312+ SignificantTermsAggregatorFactory termsAggregatorFactory ,
313+ List <PipelineAggregator > pipelineAggregators ,
314+ Map <String , Object > metaData ) throws IOException {
315+
283316 final IncludeExclude .OrdinalsFilter filter = includeExclude == null ? null : includeExclude .convertToOrdinalsFilter (format );
284- return new GlobalOrdinalsSignificantTermsAggregator .WithHash (name , factories ,
285- (ValuesSource .Bytes .WithOrdinals .FieldData ) valuesSource , format , bucketCountThresholds , filter ,
286- aggregationContext , parent , significanceHeuristic , termsAggregatorFactory , pipelineAggregators , metaData );
317+ return new GlobalOrdinalsSignificantTermsAggregator (name , factories ,
318+ (ValuesSource .Bytes .WithOrdinals .FieldData ) valuesSource , format , bucketCountThresholds , filter , aggregationContext , parent ,
319+ true , significanceHeuristic , termsAggregatorFactory , pipelineAggregators , metaData );
320+
287321 }
288322 };
289323
@@ -302,11 +336,18 @@ public static ExecutionMode fromString(String value) {
302336 this .parseField = parseField ;
303337 }
304338
305- abstract Aggregator create (String name , AggregatorFactories factories , ValuesSource valuesSource , DocValueFormat format ,
306- TermsAggregator .BucketCountThresholds bucketCountThresholds , IncludeExclude includeExclude ,
307- SearchContext aggregationContext , Aggregator parent , SignificanceHeuristic significanceHeuristic ,
308- SignificantTermsAggregatorFactory termsAggregatorFactory , List <PipelineAggregator > pipelineAggregators ,
309- Map <String , Object > metaData ) throws IOException ;
339+ abstract Aggregator create (String name ,
340+ AggregatorFactories factories ,
341+ ValuesSource valuesSource ,
342+ DocValueFormat format ,
343+ TermsAggregator .BucketCountThresholds bucketCountThresholds ,
344+ IncludeExclude includeExclude ,
345+ SearchContext aggregationContext ,
346+ Aggregator parent ,
347+ SignificanceHeuristic significanceHeuristic ,
348+ SignificantTermsAggregatorFactory termsAggregatorFactory ,
349+ List <PipelineAggregator > pipelineAggregators ,
350+ Map <String , Object > metaData ) throws IOException ;
310351
311352 @ Override
312353 public String toString () {
0 commit comments