Class GeoGridAggregator<T extends InternalGeoGrid>
java.lang.Object
org.opensearch.search.aggregations.BucketCollector
org.opensearch.search.aggregations.Aggregator
org.opensearch.search.aggregations.AggregatorBase
org.opensearch.search.aggregations.bucket.BucketsAggregator
org.opensearch.geo.search.aggregations.bucket.geogrid.GeoGridAggregator<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.search.Collector,org.opensearch.common.lease.Releasable
- Direct Known Subclasses:
GeoHashGridAggregator,GeoTileGridAggregator
Aggregates data expressed as longs (for efficiency's sake) but formats results as aggregation-specific strings.
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
BucketsAggregator.BucketBuilderForFixedCount<B>, BucketsAggregator.BucketBuilderForVariable<B>, BucketsAggregator.ResultBuilderForVariable<B>, BucketsAggregator.SingleBucketResultBuilderNested classes/interfaces inherited from class org.opensearch.search.aggregations.Aggregator
Aggregator.BucketComparator, Aggregator.Parser, Aggregator.SubAggCollectionMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LongKeyedBucketOrdsprotected final intprotected final intprotected final ValuesSource.NumericFields inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
docCountProviderFields inherited from class org.opensearch.search.aggregations.AggregatorBase
collectableSubAggregators, context, DEFAULT_WEIGHT, name, parent, subAggregatorsFields inherited from class org.opensearch.search.aggregations.BucketCollector
NO_OP_COLLECTOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGeoGridAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, int requiredSize, int shardSize, SearchContext aggregationContext, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TbuildAggregation(String name, int requiredSize, List<InternalGeoGridBucket> buckets, Map<String, Object> metadata) buildAggregations(long[] owningBucketOrds) voiddoClose()protected abstract InternalGeoGridBucketThis method is used to return a re-usable instance of the bucket when building the aggregation.org.apache.lucene.search.ScoreModeMethods inherited from class org.opensearch.search.aggregations.bucket.BucketsAggregator
beforeBuildingBuckets, bucketComparator, bucketDocCount, buildAggregationsForFixedBucketCount, buildAggregationsForSingleBucket, buildAggregationsForVariableBuckets, buildSubAggsForAllBuckets, buildSubAggsForBuckets, buildSubAggsForBuckets, close, collectBucket, collectExistingBucket, descendsFromGlobalAggregator, getDocCounts, grow, incrementBucketDocCount, maxBucketOrd, mergeBuckets, mergeBuckets, preGetSubLeafCollectors, resolveSortPathMethods inherited from class org.opensearch.search.aggregations.AggregatorBase
addRequestCircuitBreakerBytes, buildEmptySubAggregations, context, doPostCollection, doPreCollection, getLeafCollector, metadata, name, parent, pointReaderIfAvailable, postCollection, preCollection, subAggregator, subAggregators, toStringMethods inherited from class org.opensearch.search.aggregations.Aggregator
buildTopLevel, collectDebugInfo, resolveSortPathOnValidAggMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.search.Collector
setWeight
-
Field Details
-
requiredSize
protected final int requiredSize -
shardSize
protected final int shardSize -
valuesSource
-
bucketOrds
-
-
Constructor Details
-
GeoGridAggregator
protected GeoGridAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, int requiredSize, int shardSize, SearchContext aggregationContext, Aggregator parent, CardinalityUpperBound cardinality, Map<String, Object> metadata) throws IOException- Throws:
IOException
-
-
Method Details
-
scoreMode
public org.apache.lucene.search.ScoreMode scoreMode()- Specified by:
scoreModein interfaceorg.apache.lucene.search.Collector- Overrides:
scoreModein classAggregatorBase
-
getLeafCollector
public LeafBucketCollector getLeafCollector(LeafReaderContext ctx, LeafBucketCollector sub) throws IOException - Specified by:
getLeafCollectorin classAggregatorBase- Throws:
IOException
-
buildAggregation
-
newEmptyBucket
This method is used to return a re-usable instance of the bucket when building the aggregation.- Returns:
- a new
InternalGeoGridBucketimplementation with empty parameters
-
buildAggregations
- Specified by:
buildAggregationsin classAggregator- Throws:
IOException
-
buildEmptyAggregation
- Specified by:
buildEmptyAggregationin classAggregator
-
doClose
public void doClose()- Overrides:
doClosein classAggregatorBase
-