Class DistanceFeatureQueryBase<TOrigin,TDistance>
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
co.elastic.clients.elasticsearch._types.query_dsl.DistanceFeatureQueryBase<TOrigin,TDistance>
- All Implemented Interfaces:
JsonpSerializable
- Direct Known Subclasses:
DateDistanceFeatureQuery,GeoDistanceFeatureQuery,UntypedDistanceFeatureQuery
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDistanceFeatureQueryBase.AbstractBuilder<TOrigin,TDistance, BuilderT extends DistanceFeatureQueryBase.AbstractBuilder<TOrigin, TDistance, BuilderT>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringfield()Required - Name of the field used to calculate distances.final TOriginorigin()Required - Date or point of origin used to calculate distances.final TDistancepivot()Required - Distance from theoriginat which relevance scores receive half of theboostvalue.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <TOrigin,TDistance, BuilderT extends DistanceFeatureQueryBase.AbstractBuilder<TOrigin, TDistance, BuilderT>>
voidsetupDistanceFeatureQueryBaseDeserializer(ObjectDeserializer<BuilderT> op, JsonpDeserializer<TOrigin> tOriginDeserializer, JsonpDeserializer<TDistance> tDistanceDeserializer)
-
Constructor Details
-
DistanceFeatureQueryBase
protected DistanceFeatureQueryBase(DistanceFeatureQueryBase.AbstractBuilder<TOrigin, TDistance, ?> builder)
-
-
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 -
serializeInternal
- Overrides:
serializeInternalin classQueryBase
-
setupDistanceFeatureQueryBaseDeserializer
protected static <TOrigin,TDistance, void setupDistanceFeatureQueryBaseDeserializerBuilderT extends DistanceFeatureQueryBase.AbstractBuilder<TOrigin, TDistance, BuilderT>> (ObjectDeserializer<BuilderT> op, JsonpDeserializer<TOrigin> tOriginDeserializer, JsonpDeserializer<TDistance> tDistanceDeserializer)
-