Class DistanceFeatureQuery.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder<DistanceFeatureQuery.Builder>
co.elastic.clients.elasticsearch._types.query_dsl.DistanceFeatureQuery.Builder
- All Implemented Interfaces:
WithJson<DistanceFeatureQuery.Builder>
,ObjectBuilder<DistanceFeatureQuery>
- Enclosing class:
- DistanceFeatureQuery
public static class DistanceFeatureQuery.Builder
extends QueryBase.AbstractBuilder<DistanceFeatureQuery.Builder>
implements ObjectBuilder<DistanceFeatureQuery>
Builder for
DistanceFeatureQuery
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aDistanceFeatureQuery
.Required - Name of the field used to calculate distances.Required - Date or point of origin used to calculate distances.Required - Distance from theorigin
at which relevance scores receive half of theboost
value.protected DistanceFeatureQuery.Builder
self()
Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase.AbstractBuilder
boost, queryName
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
self
- Specified by:
self
in classQueryBase.AbstractBuilder<DistanceFeatureQuery.Builder>
-
build
Builds aDistanceFeatureQuery
.- Specified by:
build
in interfaceObjectBuilder<DistanceFeatureQuery>
- Throws:
NullPointerException
- if some of the required fields are null.
-