Class DistanceFeatureQuery

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

@JsonpDeserializable public class DistanceFeatureQuery 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
    • origin

      public final JsonData origin()
      Required - Date or point of origin used to calculate distances. If the field value is a date or date_nanos field, the origin value must be a date. Date Math, such as now-1h, is supported. If the field value is a geo_point field, the origin value must be a geopoint.

      API name: origin

    • pivot

      public final JsonData pivot()
      Required - Distance from the origin at which relevance scores receive half of the boost value. If the field value is a date or date_nanos field, the pivot value must be a time unit, such as 1h or 10d. If the field value is a geo_point field, the pivot value must be a distance unit, such as 1km or 12m.

      API name: pivot

    • field

      public final String field()
      Required - Name of the field used to calculate distances. This field must meet the following criteria: be a date, date_nanos or geo_point field; have an index mapping parameter value of true, which is the default; have an doc_values mapping parameter value of true, which is the default.

      API name: field

    • serializeInternal

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

      protected static void setupDistanceFeatureQueryDeserializer(ObjectDeserializer<DistanceFeatureQuery.Builder> op)