Class GeoDistanceQuery

java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
co.elastic.clients.elasticsearch._types.query_dsl.GeoDistanceQuery
All Implemented Interfaces:
QueryVariant, JsonpSerializable

@JsonpDeserializable public class GeoDistanceQuery extends QueryBase implements QueryVariant
See Also:
  • Field Details

  • Method Details

    • of

    • _queryKind

      public Query.Kind _queryKind()
      Query variant kind.
      Specified by:
      _queryKind in interface QueryVariant
    • field

      public final String field()
      Required -
    • location

      public final GeoLocation location()
      Required -
    • distance

      public final String 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

      @Nullable public final GeoDistanceType distanceType()
      How to compute the distance. Set to plane for a faster calculation that's inaccurate on long distances and close to the poles.

      API name: distance_type

    • validationMethod

      @Nullable public final GeoValidationMethod validationMethod()
      Set to IGNORE_MALFORMED to accept geo points with invalid latitude or longitude. Set to COERCE to also try to infer correct latitude or longitude.

      API name: validation_method

    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Overrides:
      serializeInternal in class QueryBase
    • setupGeoDistanceQueryDeserializer

      protected static void setupGeoDistanceQueryDeserializer(ObjectDeserializer<GeoDistanceQuery.Builder> op)