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
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
QueryBase.AbstractBuilder<BuilderT extends QueryBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<DistanceFeatureQuery>
Json deserializer forDistanceFeatureQuery
-
Method Summary
Modifier and TypeMethodDescriptionQuery variant kind.final String
field()
Required - Name of the field used to calculate distances.static DistanceFeatureQuery
final JsonData
origin()
Required - Date or point of origin used to calculate distances.final JsonData
pivot()
Required - Distance from theorigin
at which relevance scores receive half of theboost
value.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
boost, queryName, serialize, setupQueryBaseDeserializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch._types.query_dsl.QueryVariant
_toQuery
-
Field Details
-
_DESERIALIZER
Json deserializer forDistanceFeatureQuery
-
-
Method Details
-
of
public static DistanceFeatureQuery of(Function<DistanceFeatureQuery.Builder, ObjectBuilder<DistanceFeatureQuery>> fn) -
_queryKind
Query variant kind.- Specified by:
_queryKind
in interfaceQueryVariant
-
origin
Required - Date or point of origin used to calculate distances. If thefield
value is adate
ordate_nanos
field, theorigin
value must be a date. Date Math, such asnow-1h
, is supported. If the field value is ageo_point
field, theorigin
value must be a geopoint.API name:
origin
-
pivot
Required - Distance from theorigin
at which relevance scores receive half of theboost
value. If thefield
value is adate
ordate_nanos
field, thepivot
value must be a time unit, such as1h
or10d
. If thefield
value is ageo_point
field, thepivot
value must be a distance unit, such as1km
or12m
.API name:
pivot
-
field
Required - Name of the field used to calculate distances. This field must meet the following criteria: be adate
,date_nanos
orgeo_point
field; have anindex
mapping parameter value oftrue
, which is the default; have andoc_values
mapping parameter value oftrue
, which is the default.API name:
field
-
serializeInternal
- Overrides:
serializeInternal
in classQueryBase
-
setupDistanceFeatureQueryDeserializer
protected static void setupDistanceFeatureQueryDeserializer(ObjectDeserializer<DistanceFeatureQuery.Builder> op)
-