public ParentJoinAggregator(String name, AggregatorFactories factories, SearchContext context, Aggregator parent, Query inFilter, Query outFilter, ValuesSource.Bytes.WithOrdinals valuesSource, long maxOrd, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, factories, context, parent, pipelineAggregators, metaData); if (maxOrd > Integer.MAX_VALUE) { throw new IllegalStateException("the number of parent [" + maxOrd + "] + is greater than the allowed limit " + "for this aggregation: " + Integer.MAX_VALUE); } // these two filters are cached in the parser this.inFilter = context.searcher().createWeight(context.searcher().rewrite(inFilter), false,1f); this.outFilter = context.searcher().createWeight(context.searcher().rewrite(outFilter), false,1f); this.valuesSource = valuesSource; this.singleAggregator = parent == null; this.ordsBit = singleAggregator ? new BitArray((int) maxOrd, context.bigArrays()) : null; this.ordsHash = singleAggregator ? null : new LongHash(1, context.bigArrays()); }
public ParentJoinAggregator(String name, AggregatorFactories factories, SearchContext context, Aggregator parent, Query inFilter, Query outFilter, ValuesSource.Bytes.WithOrdinals valuesSource, long maxOrd, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, factories, context, parent, pipelineAggregators, metaData); if (maxOrd > Integer.MAX_VALUE) { throw new IllegalStateException("the number of parent [" + maxOrd + "] + is greater than the allowed limit " + "for this aggregation: " + Integer.MAX_VALUE); } // these two filters are cached in the parser this.inFilter = context.searcher().createWeight(context.searcher().rewrite(inFilter), false,1f); this.outFilter = context.searcher().createWeight(context.searcher().rewrite(outFilter), false,1f); this.valuesSource = valuesSource; this.singleAggregator = parent == null; this.ordsBit = singleAggregator ? new BitArray((int) maxOrd, context.bigArrays()) : null; this.ordsHash = singleAggregator ? null : new LongHash(1, context.bigArrays()); }