Class GeoDistanceAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.GeoDistanceAggregation.Builder
- All Implemented Interfaces:
WithJson<GeoDistanceAggregation.Builder>,ObjectBuilder<GeoDistanceAggregation>
- Enclosing class:
- GeoDistanceAggregation
public static class GeoDistanceAggregation.Builder
extends BucketAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
implements ObjectBuilder<GeoDistanceAggregation>
Builder for
GeoDistanceAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGeoDistanceAggregation.distanceType(GeoDistanceType value) The distance calculation type.A field of typegeo_pointused to evaluate the distance.origin(GeoLocation value) The origin used to evaluate the distance.The origin used to evaluate the distance.ranges(AggregationRange value, AggregationRange... values) An array of ranges used to bucket documents.An array of ranges used to bucket documents.ranges(List<AggregationRange> list) An array of ranges used to bucket documents.protected GeoDistanceAggregation.Builderself()unit(DistanceUnit value) The distance unit.Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, nameMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
distanceType
The distance calculation type.API name:
distance_type -
field
A field of typegeo_pointused to evaluate the distance.API name:
field -
origin
The origin used to evaluate the distance.API name:
origin -
origin
public final GeoDistanceAggregation.Builder origin(Function<GeoLocation.Builder, ObjectBuilder<GeoLocation>> fn) The origin used to evaluate the distance.API name:
origin -
ranges
An array of ranges used to bucket documents.API name:
rangesAdds all elements of
listtoranges. -
ranges
public final GeoDistanceAggregation.Builder ranges(AggregationRange value, AggregationRange... values) An array of ranges used to bucket documents.API name:
rangesAdds one or more values to
ranges. -
ranges
public final GeoDistanceAggregation.Builder ranges(Function<AggregationRange.Builder, ObjectBuilder<AggregationRange>> fn) An array of ranges used to bucket documents.API name:
rangesAdds a value to
rangesusing a builder lambda. -
unit
The distance unit.API name:
unit -
self
- Specified by:
selfin classAggregationBase.AbstractBuilder<GeoDistanceAggregation.Builder>
-
build
Builds aGeoDistanceAggregation.- Specified by:
buildin interfaceObjectBuilder<GeoDistanceAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-