Class DistanceFeatureQueryBase.AbstractBuilder<TOrigin,TDistance,BuilderT extends DistanceFeatureQueryBase.AbstractBuilder<TOrigin,TDistance,BuilderT>>

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.DistanceFeatureQueryBase.AbstractBuilder<TOrigin,TDistance,BuilderT>
All Implemented Interfaces:
WithJson<BuilderT>
Direct Known Subclasses:
DateDistanceFeatureQuery.Builder, GeoDistanceFeatureQuery.Builder, UntypedDistanceFeatureQuery.Builder
Enclosing class:
DistanceFeatureQueryBase<TOrigin,TDistance>

public abstract static class DistanceFeatureQueryBase.AbstractBuilder<TOrigin,TDistance,BuilderT extends DistanceFeatureQueryBase.AbstractBuilder<TOrigin,TDistance,BuilderT>> extends QueryBase.AbstractBuilder<BuilderT>
  • Constructor Details

    • AbstractBuilder

      public AbstractBuilder()
  • Method Details

    • origin

      public final BuilderT origin(TOrigin value)
      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 BuilderT pivot(TDistance value)
      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 BuilderT field(String value)
      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

    • tOriginSerializer

      public final BuilderT tOriginSerializer(@Nullable JsonpSerializer<TOrigin> value)
      Serializer for TOrigin. If not set, an attempt will be made to find a serializer from the JSON context.
    • tDistanceSerializer

      public final BuilderT tDistanceSerializer(@Nullable JsonpSerializer<TDistance> value)
      Serializer for TDistance. If not set, an attempt will be made to find a serializer from the JSON context.