Class GeoDistanceQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<GeoDistanceQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.GeoDistanceQuery.Builder
- All Implemented Interfaces:
WithJson<GeoDistanceQuery.Builder>,ObjectBuilder<GeoDistanceQuery>
- Enclosing class:
- GeoDistanceQuery
public static class GeoDistanceQuery.Builder
extends QueryBase.AbstractBuilder<GeoDistanceQuery.Builder>
implements ObjectBuilder<GeoDistanceQuery>
Builder for
GeoDistanceQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGeoDistanceQuery.final GeoDistanceQuery.BuilderRequired - The radius of the circle centred on the specified location.final GeoDistanceQuery.BuilderdistanceType(GeoDistanceType value) How to compute the distance.final GeoDistanceQuery.BuilderRequired -final GeoDistanceQuery.BuilderignoreUnmapped(Boolean value) Set totrueto ignore an unmapped field and not match any documents for this query.final GeoDistanceQuery.Builderlocation(GeoLocation value) Required -final GeoDistanceQuery.BuilderRequired -protected GeoDistanceQuery.Builderself()final GeoDistanceQuery.BuilderSet toIGNORE_MALFORMEDto accept geo points with invalid latitude or longitude.Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryNameMethods 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
-
field
Required - -
location
Required - -
location
public final GeoDistanceQuery.Builder location(Function<GeoLocation.Builder, ObjectBuilder<GeoLocation>> fn) Required - -
distance
Required - The radius of the circle centred on the specified location. Points which fall into this circle are considered to be matches.API name:
distance -
distanceType
How to compute the distance. Set toplanefor a faster calculation that's inaccurate on long distances and close to the poles.API name:
distance_type -
validationMethod
Set toIGNORE_MALFORMEDto accept geo points with invalid latitude or longitude. Set toCOERCEto also try to infer correct latitude or longitude.API name:
validation_method -
ignoreUnmapped
Set totrueto ignore an unmapped field and not match any documents for this query. Set tofalseto throw an exception if the field is not mapped.API name:
ignore_unmapped -
self
- Specified by:
selfin classQueryBase.AbstractBuilder<GeoDistanceQuery.Builder>
-
build
Builds aGeoDistanceQuery.- Specified by:
buildin interfaceObjectBuilder<GeoDistanceQuery>- Throws:
NullPointerException- if some of the required fields are null.
-