Class GeoDistanceQuery.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder<GeoDistanceQuery.Builder>
org.opensearch.client.opensearch._types.query_dsl.GeoDistanceQuery.Builder
- All Implemented Interfaces:
CopyableBuilder<GeoDistanceQuery.Builder,,GeoDistanceQuery> MutableBuilder<GeoDistanceQuery.Builder,,GeoDistanceQuery> ObjectBuilder<GeoDistanceQuery>
- Enclosing class:
GeoDistanceQuery
public static class GeoDistanceQuery.Builder
extends QueryBase.AbstractBuilder<GeoDistanceQuery.Builder>
implements CopyableBuilder<GeoDistanceQuery.Builder,GeoDistanceQuery>
Builder for
GeoDistanceQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGeoDistanceQuery.copy()Create a new builderCopyableBuilderthat is a copy of this one.final GeoDistanceQuery.BuilderRequired - API name:distancefinal GeoDistanceQuery.BuilderdistanceType(GeoDistanceType value) API name:distance_typefinal GeoDistanceQuery.BuilderRequired -final GeoDistanceQuery.BuilderignoreUnmapped(Boolean value) API name:ignore_unmappedfinal GeoDistanceQuery.BuilderRequired -final GeoDistanceQuery.Builderlocation(GeoLocation value) Required -protected GeoDistanceQuery.Builderself()final GeoDistanceQuery.BuilderAPI name:validation_methodMethods inherited from class org.opensearch.client.opensearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryNameMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<GeoDistanceQuery.Builder,GeoDistanceQuery> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classQueryBase.AbstractBuilder<GeoDistanceQuery.Builder>
-
distance
Required - API name:distance -
distanceType
API name:distance_type -
field
Required - -
ignoreUnmapped
API name:ignore_unmapped -
location
Required -A latitude/longitude as a two-dimensional point. It can be represented in the following ways:
- As a
{lat, long}object. - As a geohash value.
- As a
[lon, lat]array. - As a string in
<lat>, <lon>or WKT point format.
- As a
-
location
@Nonnull public final GeoDistanceQuery.Builder location(Function<GeoLocation.Builder, ObjectBuilder<GeoLocation>> fn) Required -A latitude/longitude as a two-dimensional point. It can be represented in the following ways:
- As a
{lat, long}object. - As a geohash value.
- As a
[lon, lat]array. - As a string in
<lat>, <lon>or WKT point format.
- As a
-
validationMethod
@Nonnull public final GeoDistanceQuery.Builder validationMethod(@Nullable GeoValidationMethod value) API name:validation_method -
build
Builds aGeoDistanceQuery.- Specified by:
buildin interfaceObjectBuilder<GeoDistanceQuery>- Throws:
NullPointerException- if some of the required fields are null.
-