Class GeoGridAggregationBuilder
java.lang.Object
org.opensearch.search.aggregations.AggregationBuilder
org.opensearch.search.aggregations.AbstractAggregationBuilder<GeoGridAggregationBuilder>
org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder<GeoGridAggregationBuilder>
org.opensearch.geo.search.aggregations.bucket.geogrid.GeoGridAggregationBuilder
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.NamedWriteable,org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentFragment,Rewriteable<AggregationBuilder>,BaseAggregationBuilder
- Direct Known Subclasses:
GeoHashGridAggregationBuilder,GeoTileGridAggregationBuilder
public abstract class GeoGridAggregationBuilder
extends ValuesSourceAggregationBuilder<GeoGridAggregationBuilder>
Base Aggregation Builder for geogrid aggs
- Opensearch.internal:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceA precision parserNested classes/interfaces inherited from class org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder
ValuesSourceAggregationBuilder.LeafOnly<VS extends ValuesSource,AB extends ValuesSourceAggregationBuilder<AB>> Nested classes/interfaces inherited from class org.opensearch.search.aggregations.AggregationBuilder
AggregationBuilder.BucketCardinality, AggregationBuilder.CommonFieldsNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intFields inherited from class org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder
configFields inherited from class org.opensearch.search.aggregations.AbstractAggregationBuilder
metadataFields inherited from class org.opensearch.search.aggregations.AggregationBuilder
factoriesBuilder, nameFields inherited from interface org.opensearch.index.query.Rewriteable
MAX_REWRITE_ROUNDSFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionGeoGridAggregationBuilder(org.opensearch.core.common.io.stream.StreamInput in) Read from a stream.protectedGeoGridAggregationBuilder(GeoGridAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ValuesSourceAggregatorFactorycreateFactory(String name, ValuesSourceConfig config, int precision, int requiredSize, int shardSize, GeoBoundingBox geoBoundingBox, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metadata) Creates a new instance of theValuesSourceAggregatorFactory-derived class specific to the geo aggregation.static <T extends GeoGridAggregationBuilder>
org.opensearch.core.xcontent.ObjectParser<T, String> createParser(String name, GeoGridAggregationBuilder.PrecisionParser precisionParser, Function<String, T> ctor) protected ValuesSourceTypeprotected org.opensearch.core.xcontent.XContentBuilderdoXContentBody(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) booleaninthashCode()protected ValuesSourceAggregatorFactoryinnerBuild(QueryShardContext queryShardContext, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) protected voidinnerWriteTo(org.opensearch.core.common.io.stream.StreamOutput out) intabstract GeoGridAggregationBuilderprecision(int precision) method to validate and set the precision valuesetGeoBoundingBox(GeoBoundingBox geoBoundingBox) intshardSize(int shardSize) intsize()size(int size) Methods inherited from class org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder
declareFields, declareFields, doBuild, doWriteTo, field, field, format, format, getRegistryKey, internalXContent, missing, missing, resolveConfig, script, script, serializeTargetValueType, timeZone, timeZone, userValueTypeHint, userValueTypeHintMethods inherited from class org.opensearch.search.aggregations.AbstractAggregationBuilder
build, getMetadata, getWriteableName, setMetadata, subAggregation, subAggregation, subAggregations, toXContent, writeToMethods inherited from class org.opensearch.search.aggregations.AggregationBuilder
buildPipelineTree, doRewrite, getName, getPipelineAggregations, getSubAggregations, rewrite, shallowCopy, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensearch.search.aggregations.BaseAggregationBuilder
getTypeMethods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Field Details
-
precision
protected int precision -
requiredSize
protected int requiredSize -
shardSize
protected int shardSize
-
-
Constructor Details
-
GeoGridAggregationBuilder
-
GeoGridAggregationBuilder
protected GeoGridAggregationBuilder(GeoGridAggregationBuilder clone, AggregatorFactories.Builder factoriesBuilder, Map<String, Object> metadata) -
GeoGridAggregationBuilder
public GeoGridAggregationBuilder(org.opensearch.core.common.io.stream.StreamInput in) throws IOException Read from a stream.- Throws:
IOException
-
-
Method Details
-
createParser
public static <T extends GeoGridAggregationBuilder> org.opensearch.core.xcontent.ObjectParser<T,String> createParser(String name, GeoGridAggregationBuilder.PrecisionParser precisionParser, Function<String, T> ctor) -
defaultValueSourceType
- Specified by:
defaultValueSourceTypein classValuesSourceAggregationBuilder<GeoGridAggregationBuilder>
-
innerWriteTo
protected void innerWriteTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException - Specified by:
innerWriteToin classValuesSourceAggregationBuilder<GeoGridAggregationBuilder>- Throws:
IOException
-
precision
method to validate and set the precision value- Parameters:
precision- the precision to set for the aggregation- Returns:
- the
GeoGridAggregationBuilderbuilder
-
createFactory
protected abstract ValuesSourceAggregatorFactory createFactory(String name, ValuesSourceConfig config, int precision, int requiredSize, int shardSize, GeoBoundingBox geoBoundingBox, QueryShardContext queryShardContext, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder, Map<String, Object> metadata) throws IOExceptionCreates a new instance of theValuesSourceAggregatorFactory-derived class specific to the geo aggregation.- Throws:
IOException
-
precision
public int precision() -
size
-
size
public int size() -
shardSize
-
shardSize
public int shardSize() -
setGeoBoundingBox
-
geoBoundingBox
-
bucketCardinality
- Specified by:
bucketCardinalityin classAggregationBuilder
-
innerBuild
protected ValuesSourceAggregatorFactory innerBuild(QueryShardContext queryShardContext, ValuesSourceConfig config, AggregatorFactory parent, AggregatorFactories.Builder subFactoriesBuilder) throws IOException - Specified by:
innerBuildin classValuesSourceAggregationBuilder<GeoGridAggregationBuilder>- Throws:
IOException
-
doXContentBody
protected org.opensearch.core.xcontent.XContentBuilder doXContentBody(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
doXContentBodyin classValuesSourceAggregationBuilder<GeoGridAggregationBuilder>- Throws:
IOException
-
equals
- Overrides:
equalsin classValuesSourceAggregationBuilder<GeoGridAggregationBuilder>
-
hashCode
public int hashCode()- Overrides:
hashCodein classValuesSourceAggregationBuilder<GeoGridAggregationBuilder>
-