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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BuilderTRequired - Name of the field used to calculate distances.final BuilderTRequired - Date or point of origin used to calculate distances.final BuilderTRequired - Distance from theoriginat which relevance scores receive half of theboostvalue.final BuilderTSerializer for TDistance.final BuilderTtOriginSerializer(JsonpSerializer<TOrigin> value) Serializer for TOrigin.Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryName, selfMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
AbstractBuilder
public AbstractBuilder()
-
-
Method Details
-
origin
Required - Date or point of origin used to calculate distances. If thefieldvalue is adateordate_nanosfield, theoriginvalue must be a date. Date Math, such asnow-1h, is supported. If the field value is ageo_pointfield, theoriginvalue must be a geopoint.API name:
origin -
pivot
Required - Distance from theoriginat which relevance scores receive half of theboostvalue. If thefieldvalue is adateordate_nanosfield, thepivotvalue must be a time unit, such as1hor10d. If thefieldvalue is ageo_pointfield, thepivotvalue must be a distance unit, such as1kmor12m.API name:
pivot -
field
Required - Name of the field used to calculate distances. This field must meet the following criteria: be adate,date_nanosorgeo_pointfield; have anindexmapping parameter value oftrue, which is the default; have andoc_valuesmapping parameter value oftrue, which is the default.API name:
field -
tOriginSerializer
Serializer for TOrigin. If not set, an attempt will be made to find a serializer from the JSON context. -
tDistanceSerializer
Serializer for TDistance. If not set, an attempt will be made to find a serializer from the JSON context.
-