/** * Sole constructor. * * @param shardSize * The number of top-scoring docs to collect for each bucket */ BestDocsDeferringCollector(int shardSize, BigArrays bigArrays) { this.shardSize = shardSize; this.bigArrays = bigArrays; perBucketSamples = bigArrays.newObjectArray(1); }
BinaryValuesSource(BigArrays bigArrays, LongConsumer breakerConsumer, MappedFieldType fieldType, CheckedFunction<LeafReaderContext, SortedBinaryDocValues, IOException> docValuesFunc, DocValueFormat format, boolean missingBucket, Object missing, int size, int reverseMul) { super(bigArrays, format, fieldType, missingBucket, missing, size, reverseMul); this.breakerConsumer = breakerConsumer; this.docValuesFunc = docValuesFunc; this.values = bigArrays.newObjectArray(Math.min(size, 100)); this.valueBuilders = bigArrays.newObjectArray(Math.min(size, 100)); }
public AbstractTDigestPercentilesAggregator(String name, ValuesSource.Numeric valuesSource, SearchContext context, Aggregator parent, double[] keys, double compression, boolean keyed, DocValueFormat formatter, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, context, parent, pipelineAggregators, metaData); this.valuesSource = valuesSource; this.keyed = keyed; this.formatter = formatter; this.states = context.bigArrays().newObjectArray(1); this.keys = keys; this.compression = compression; }
MultiBucketAggregatorWrapper(BigArrays bigArrays, SearchContext context, Aggregator parent, AggregatorFactory<?> factory, Aggregator first) { this.bigArrays = bigArrays; this.parent = parent; this.factory = factory; this.first = first; context.addReleasable(this, Lifetime.PHASE); aggregators = bigArrays.newObjectArray(1); aggregators.set(0, first); collectors = bigArrays.newObjectArray(1); }
public AbstractHDRPercentilesAggregator(String name, ValuesSource.Numeric valuesSource, SearchContext context, Aggregator parent, double[] keys, int numberOfSignificantValueDigits, boolean keyed, DocValueFormat formatter, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, context, parent, pipelineAggregators, metaData); this.valuesSource = valuesSource; this.keyed = keyed; this.format = formatter; this.states = context.bigArrays().newObjectArray(1); this.keys = keys; this.numberOfSignificantValueDigits = numberOfSignificantValueDigits; }
OrdinalsCollector(HyperLogLogPlusPlus counts, SortedSetDocValues values, BigArrays bigArrays) { if (values.getValueCount() > Integer.MAX_VALUE) { throw new IllegalArgumentException(); } maxOrd = (int) values.getValueCount(); this.bigArrays = bigArrays; this.counts = counts; this.values = values; visitedOrds = bigArrays.newObjectArray(1); }
MedianAbsoluteDeviationAggregator(String name, SearchContext context, Aggregator parent, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData, @Nullable ValuesSource.Numeric valuesSource, DocValueFormat format, double compression) throws IOException { super(name, context, parent, pipelineAggregators, metaData); this.valuesSource = valuesSource; this.format = Objects.requireNonNull(format); this.compression = compression; this.valueSketches = context.bigArrays().newObjectArray(1); }
public LongObjectPagedHashMap(long capacity, float maxLoadFactor, BigArrays bigArrays) { super(capacity, maxLoadFactor, bigArrays); keys = bigArrays.newLongArray(capacity(), false); values = bigArrays.newObjectArray(capacity()); }
/** Resize the array to the exact provided size. */ public <T> ObjectArray<T> resize(ObjectArray<T> array, long size) { if (array instanceof BigObjectArray) { return resizeInPlace((BigObjectArray<T>) array, size); } else { final ObjectArray<T> newArray = newObjectArray(size); for (long i = 0, end = Math.min(size, array.size()); i < end; ++i) { newArray.set(i, array.get(i)); } array.close(); return newArray; } }
/** * Sole constructor. * * @param shardSize * The number of top-scoring docs to collect for each bucket */ BestDocsDeferringCollector(int shardSize, BigArrays bigArrays) { this.shardSize = shardSize; this.bigArrays = bigArrays; perBucketSamples = bigArrays.newObjectArray(1); }
/** * Sole constructor. * * @param shardSize * The number of top-scoring docs to collect for each bucket */ public BestDocsDeferringCollector(int shardSize, BigArrays bigArrays) { this.shardSize = shardSize; this.bigArrays = bigArrays; perBucketSamples = bigArrays.newObjectArray(1); }
BinaryValuesSource(BigArrays bigArrays, LongConsumer breakerConsumer, MappedFieldType fieldType, CheckedFunction<LeafReaderContext, SortedBinaryDocValues, IOException> docValuesFunc, DocValueFormat format, boolean missingBucket, Object missing, int size, int reverseMul) { super(bigArrays, format, fieldType, missingBucket, missing, size, reverseMul); this.breakerConsumer = breakerConsumer; this.docValuesFunc = docValuesFunc; this.values = bigArrays.newObjectArray(Math.min(size, 100)); this.valueBuilders = bigArrays.newObjectArray(Math.min(size, 100)); }
public AbstractTDigestPercentilesAggregator(String name, ValuesSource.Numeric valuesSource, SearchContext context, Aggregator parent, double[] keys, double compression, boolean keyed, DocValueFormat formatter, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, context, parent, pipelineAggregators, metaData); this.valuesSource = valuesSource; this.keyed = keyed; this.formatter = formatter; this.states = context.bigArrays().newObjectArray(1); this.keys = keys; this.compression = compression; }
public AbstractHDRPercentilesAggregator(String name, ValuesSource.Numeric valuesSource, SearchContext context, Aggregator parent, double[] keys, int numberOfSignificantValueDigits, boolean keyed, DocValueFormat formatter, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, context, parent, pipelineAggregators, metaData); this.valuesSource = valuesSource; this.keyed = keyed; this.format = formatter; this.states = context.bigArrays().newObjectArray(1); this.keys = keys; this.numberOfSignificantValueDigits = numberOfSignificantValueDigits; }
@Override public <T> ObjectArray<T> newObjectArray(long size) { return new ObjectArrayWrapper<>(super.<T>newObjectArray(size)); }
public AbstractTDigestPercentilesAggregator(String name, ValuesSource.Numeric valuesSource, SearchContext context, Aggregator parent, double[] keys, double compression, boolean keyed, DocValueFormat formatter, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, context, parent, pipelineAggregators, metaData); this.valuesSource = valuesSource; this.keyed = keyed; this.formatter = formatter; this.states = context.bigArrays().newObjectArray(1); this.keys = keys; this.compression = compression; }
MultiBucketAggregatorWrapper(BigArrays bigArrays, SearchContext context, Aggregator parent, AggregatorFactory<?> factory, Aggregator first) { this.bigArrays = bigArrays; this.parent = parent; this.factory = factory; this.first = first; context.addReleasable(this, Lifetime.PHASE); aggregators = bigArrays.newObjectArray(1); aggregators.set(0, first); collectors = bigArrays.newObjectArray(1); }
MultiBucketAggregatorWrapper(BigArrays bigArrays, SearchContext context, Aggregator parent, AggregatorFactory<?> factory, Aggregator first) { this.bigArrays = bigArrays; this.parent = parent; this.factory = factory; this.first = first; context.addReleasable(this, Lifetime.PHASE); aggregators = bigArrays.newObjectArray(1); aggregators.set(0, first); collectors = bigArrays.newObjectArray(1); }
OrdinalsCollector(HyperLogLogPlusPlus counts, SortedSetDocValues values, BigArrays bigArrays) { if (values.getValueCount() > Integer.MAX_VALUE) { throw new IllegalArgumentException(); } maxOrd = (int) values.getValueCount(); this.bigArrays = bigArrays; this.counts = counts; this.values = values; visitedOrds = bigArrays.newObjectArray(1); }
public LongObjectPagedHashMap(long capacity, float maxLoadFactor, BigArrays bigArrays) { super(capacity, maxLoadFactor, bigArrays); keys = bigArrays.newLongArray(capacity(), false); values = bigArrays.newObjectArray(capacity()); }