Class DecayPlacement.Builder<TOrigin,TScale>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<DecayPlacement.Builder<TOrigin,TScale>>
co.elastic.clients.elasticsearch._types.query_dsl.DecayPlacement.Builder<TOrigin,TScale>
- All Implemented Interfaces:
WithJson<DecayPlacement.Builder<TOrigin,,TScale>> ObjectBuilder<DecayPlacement<TOrigin,TScale>>
- Enclosing class:
- DecayPlacement<TOrigin,
TScale>
public static class DecayPlacement.Builder<TOrigin,TScale>
extends WithJsonObjectBuilderBase<DecayPlacement.Builder<TOrigin,TScale>>
implements ObjectBuilder<DecayPlacement<TOrigin,TScale>>
Builder for
DecayPlacement.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aDecayPlacement.final DecayPlacement.Builder<TOrigin,TScale> Defines how documents are scored at the distance given at scale.final DecayPlacement.Builder<TOrigin,TScale> If defined, the decay function will only compute the decay function for documents with a distance greater than the definedoffset.final DecayPlacement.Builder<TOrigin,TScale> The point of origin used for calculating distance.final DecayPlacement.Builder<TOrigin,TScale> Defines the distance from origin + offset at which the computed score will equaldecayparameter.protected DecayPlacement.Builder<TOrigin,TScale> self()final DecayPlacement.Builder<TOrigin,TScale> tOriginSerializer(JsonpSerializer<TOrigin> value) Serializer for TOrigin.final DecayPlacement.Builder<TOrigin,TScale> tScaleSerializer(JsonpSerializer<TScale> value) Serializer for TScale.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
decay
Defines how documents are scored at the distance given at scale.API name:
decay -
offset
If defined, the decay function will only compute the decay function for documents with a distance greater than the definedoffset.API name:
offset -
scale
Defines the distance from origin + offset at which the computed score will equaldecayparameter.API name:
scale -
origin
The point of origin used for calculating distance. Must be given as a number for numeric field, date for date fields and geo point for geo fields.API name:
origin -
tOriginSerializer
public final DecayPlacement.Builder<TOrigin,TScale> tOriginSerializer(@Nullable JsonpSerializer<TOrigin> value) Serializer for TOrigin. If not set, an attempt will be made to find a serializer from the JSON context. -
tScaleSerializer
public final DecayPlacement.Builder<TOrigin,TScale> tScaleSerializer(@Nullable JsonpSerializer<TScale> value) Serializer for TScale. If not set, an attempt will be made to find a serializer from the JSON context. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<DecayPlacement.Builder<TOrigin,TScale>>
-
build
Builds aDecayPlacement.- Specified by:
buildin interfaceObjectBuilder<TOrigin>- Throws:
NullPointerException- if some of the required fields are null.
-