Class FunctionScore
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.FunctionScore
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<FunctionScore.Kind,java.lang.Object>
@JsonpDeserializable public class FunctionScore extends java.lang.Object implements TaggedUnion<FunctionScore.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFunctionScore.Builderstatic classFunctionScore.KindFunctionScorevariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<FunctionScore>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description FunctionScore(FunctionScoreVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()FunctionScore.Kind_kind()Get the of the kind of variant held by this object.DecayFunctionexp()Get theexpvariant value.FieldValueFactorScoreFunctionfieldValueFactor()Get thefield_value_factorvariant value.Queryfilter()API name:filterDecayFunctiongauss()Get thegaussvariant value.booleanisExp()Is this variant instance of kindexp?booleanisFieldValueFactor()Is this variant instance of kindfield_value_factor?booleanisGauss()Is this variant instance of kindgauss?booleanisLinear()Is this variant instance of kindlinear?booleanisRandomScore()Is this variant instance of kindrandom_score?booleanisScriptScore()Is this variant instance of kindscript_score?DecayFunctionlinear()Get thelinearvariant value.static FunctionScoreof(java.util.function.Function<FunctionScore.Builder,ObjectBuilder<FunctionScore>> fn)RandomScoreFunctionrandomScore()Get therandom_scorevariant value.ScriptScoreFunctionscriptScore()Get thescript_scorevariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupFunctionScoreDeserializer(ObjectDeserializer<FunctionScore.Builder> op)java.lang.Doubleweight()API name:weightMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
FunctionScore
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<FunctionScore.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<FunctionScore.Kind,java.lang.Object>
-
of
public static FunctionScore of(java.util.function.Function<FunctionScore.Builder,ObjectBuilder<FunctionScore>> fn) -
filter
API name:filter -
weight
@Nullable public final java.lang.Double weight()API name:weight -
isExp
public boolean isExp()Is this variant instance of kindexp? -
exp
Get theexpvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theexpkind.
-
isGauss
public boolean isGauss()Is this variant instance of kindgauss? -
gauss
Get thegaussvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thegausskind.
-
isLinear
public boolean isLinear()Is this variant instance of kindlinear? -
linear
Get thelinearvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thelinearkind.
-
isFieldValueFactor
public boolean isFieldValueFactor()Is this variant instance of kindfield_value_factor? -
fieldValueFactor
Get thefield_value_factorvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefield_value_factorkind.
-
isRandomScore
public boolean isRandomScore()Is this variant instance of kindrandom_score? -
randomScore
Get therandom_scorevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of therandom_scorekind.
-
isScriptScore
public boolean isScriptScore()Is this variant instance of kindscript_score? -
scriptScore
Get thescript_scorevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thescript_scorekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
setupFunctionScoreDeserializer
-