Class FunctionScore
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.FunctionScore
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<FunctionScore.Kind,Object>
@JsonpDeserializable
public class FunctionScore
extends Object
implements TaggedUnion<FunctionScore.Kind,Object>, JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final FunctionScore.Kind_kind()Get the of the kind of variant held by this object.exp()Get theexpvariant value.Get thefield_value_factorvariant value.final Queryfilter()API name:filtergauss()Get thegaussvariant value.booleanisExp()Is this variant instance of kindexp?booleanIs this variant instance of kindfield_value_factor?booleanisGauss()Is this variant instance of kindgauss?booleanisLinear()Is this variant instance of kindlinear?booleanIs this variant instance of kindrandom_score?booleanIs this variant instance of kindscript_score?linear()Get thelinearvariant value.static FunctionScoreGet therandom_scorevariant value.Get thescript_scorevariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()final Doubleweight()API name:weight
-
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,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<FunctionScore.Kind,Object>
-
of
-
filter
API name:filter -
weight
API name:weight -
isExp
public boolean isExp()Is this variant instance of kindexp? -
exp
Get theexpvariant value.- Throws:
IllegalStateException- if the current variant is not of theexpkind.
-
isGauss
public boolean isGauss()Is this variant instance of kindgauss? -
gauss
Get thegaussvariant value.- Throws:
IllegalStateException- if the current variant is not of thegausskind.
-
isLinear
public boolean isLinear()Is this variant instance of kindlinear? -
linear
Get thelinearvariant value.- Throws:
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:
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:
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:
IllegalStateException- if the current variant is not of thescript_scorekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-
setupFunctionScoreDeserializer
-