public AggregatorFactories build(SearchContext context, AggregatorFactory<?> parent) throws IOException { if (aggregationBuilders.isEmpty() && pipelineAggregatorBuilders.isEmpty()) { return EMPTY; } List<PipelineAggregationBuilder> orderedpipelineAggregators = null; if (skipResolveOrder) { orderedpipelineAggregators = new ArrayList<>(pipelineAggregatorBuilders); } else { orderedpipelineAggregators = resolvePipelineAggregatorOrder(this.pipelineAggregatorBuilders, this.aggregationBuilders, parent); } AggregatorFactory<?>[] aggFactories = new AggregatorFactory<?>[aggregationBuilders.size()]; int i = 0; for (AggregationBuilder agg : aggregationBuilders) { aggFactories[i] = agg.build(context, parent); ++i; } return new AggregatorFactories(parent, aggFactories, orderedpipelineAggregators); }
public AggregatorFactories build(SearchContext context, AggregatorFactory<?> parent) throws IOException { if (aggregationBuilders.isEmpty() && pipelineAggregatorBuilders.isEmpty()) { return EMPTY; } List<PipelineAggregationBuilder> orderedpipelineAggregators = null; if (skipResolveOrder) { orderedpipelineAggregators = new ArrayList<>(pipelineAggregatorBuilders); } else { orderedpipelineAggregators = resolvePipelineAggregatorOrder(this.pipelineAggregatorBuilders, this.aggregationBuilders); } AggregatorFactory<?>[] aggFactories = new AggregatorFactory<?>[aggregationBuilders.size()]; for (int i = 0; i < aggregationBuilders.size(); i++) { aggFactories[i] = aggregationBuilders.get(i).build(context, parent); } return new AggregatorFactories(parent, aggFactories, orderedpipelineAggregators); }
public AggregatorFactories build(SearchContext context, AggregatorFactory<?> parent) throws IOException { if (aggregationBuilders.isEmpty() && pipelineAggregatorBuilders.isEmpty()) { return EMPTY; } List<PipelineAggregationBuilder> orderedpipelineAggregators = null; if (skipResolveOrder) { orderedpipelineAggregators = new ArrayList<>(pipelineAggregatorBuilders); } else { orderedpipelineAggregators = resolvePipelineAggregatorOrder(this.pipelineAggregatorBuilders, this.aggregationBuilders, parent); } AggregatorFactory<?>[] aggFactories = new AggregatorFactory<?>[aggregationBuilders.size()]; for (int i = 0; i < aggregationBuilders.size(); i++) { aggFactories[i] = aggregationBuilders.get(i).build(context, parent); } return new AggregatorFactories(parent, aggFactories, orderedpipelineAggregators); }
public AggregatorFactories build(SearchContext context, AggregatorFactory<?> parent) throws IOException { if (aggregationBuilders.isEmpty() && pipelineAggregatorBuilders.isEmpty()) { return EMPTY; } List<PipelineAggregationBuilder> orderedpipelineAggregators = null; if (skipResolveOrder) { orderedpipelineAggregators = new ArrayList<>(pipelineAggregatorBuilders); } else { orderedpipelineAggregators = resolvePipelineAggregatorOrder(this.pipelineAggregatorBuilders, this.aggregationBuilders, parent); } AggregatorFactory<?>[] aggFactories = new AggregatorFactory<?>[aggregationBuilders.size()]; int i = 0; for (AggregationBuilder agg : aggregationBuilders) { aggFactories[i] = agg.build(context, parent); ++i; } return new AggregatorFactories(parent, aggFactories, orderedpipelineAggregators); }
return aggregationBuilder.build(searchContext, null);