Class SettingsSimilarity
java.lang.Object
co.elastic.clients.elasticsearch.indices.SettingsSimilarity
- All Implemented Interfaces:
JsonpSerializable
,OpenTaggedUnion<SettingsSimilarity.Kind,
,Object> TaggedUnion<SettingsSimilarity.Kind,
Object>
@JsonpDeserializable
public class SettingsSimilarity
extends Object
implements OpenTaggedUnion<SettingsSimilarity.Kind,Object>, JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSettingsSimilarity
(String kind, JsonData value) Build a custom plugin-definedSettingsSimilarity
, given its kind and some JSON data -
Method Summary
Modifier and TypeMethodDescription_custom()
Get the custom plugin-defined variant value.final String
Get the actual kind when_kind()
equalsSettingsSimilarity.Kind._Custom
(plugin-defined variant).final Object
_get()
boolean
Is this a customSettingsSimilarity
defined by a plugin?final SettingsSimilarity.Kind
_kind()
Get the of the kind of variant held by this object.bm25()
Get theBM25
variant value.boolean_()
Get theboolean
variant value.dfi()
Get theDFI
variant value.dfr()
Get theDFR
variant value.ib()
Get theIB
variant value.boolean
isBm25()
Is this variant instance of kindBM25
?boolean
Is this variant instance of kindboolean
?boolean
isDfi()
Is this variant instance of kindDFI
?boolean
isDfr()
Is this variant instance of kindDFR
?boolean
isIb()
Is this variant instance of kindIB
?boolean
Is this variant instance of kindLMDirichlet
?boolean
Is this variant instance of kindLMJelinekMercer
?boolean
Is this variant instance of kindscripted
?Get theLMDirichlet
variant value.Get theLMJelinekMercer
variant value.static SettingsSimilarity
scripted()
Get thescripted
variant value.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
toString()
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
SettingsSimilarity
-
SettingsSimilarity
Build a custom plugin-definedSettingsSimilarity
, given its kind and some JSON data
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<SettingsSimilarity.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<SettingsSimilarity.Kind,
Object>
-
of
public static SettingsSimilarity of(Function<SettingsSimilarity.Builder, ObjectBuilder<SettingsSimilarity>> fn) -
isBm25
public boolean isBm25()Is this variant instance of kindBM25
? -
bm25
Get theBM25
variant value.- Throws:
IllegalStateException
- if the current variant is not of theBM25
kind.
-
isBoolean
public boolean isBoolean()Is this variant instance of kindboolean
? -
boolean_
Get theboolean
variant value.- Throws:
IllegalStateException
- if the current variant is not of theboolean
kind.
-
isDfi
public boolean isDfi()Is this variant instance of kindDFI
? -
dfi
Get theDFI
variant value.- Throws:
IllegalStateException
- if the current variant is not of theDFI
kind.
-
isDfr
public boolean isDfr()Is this variant instance of kindDFR
? -
dfr
Get theDFR
variant value.- Throws:
IllegalStateException
- if the current variant is not of theDFR
kind.
-
isIb
public boolean isIb()Is this variant instance of kindIB
? -
ib
Get theIB
variant value.- Throws:
IllegalStateException
- if the current variant is not of theIB
kind.
-
isLMDirichlet
public boolean isLMDirichlet()Is this variant instance of kindLMDirichlet
? -
lmdirichlet
Get theLMDirichlet
variant value.- Throws:
IllegalStateException
- if the current variant is not of theLMDirichlet
kind.
-
isLMJelinekMercer
public boolean isLMJelinekMercer()Is this variant instance of kindLMJelinekMercer
? -
lmjelinekmercer
Get theLMJelinekMercer
variant value.- Throws:
IllegalStateException
- if the current variant is not of theLMJelinekMercer
kind.
-
isScripted
public boolean isScripted()Is this variant instance of kindscripted
? -
scripted
Get thescripted
variant value.- Throws:
IllegalStateException
- if the current variant is not of thescripted
kind.
-
_isCustom
public boolean _isCustom()Is this a customSettingsSimilarity
defined by a plugin? -
_customKind
Get the actual kind when_kind()
equalsSettingsSimilarity.Kind._Custom
(plugin-defined variant).- Specified by:
_customKind
in interfaceOpenTaggedUnion<SettingsSimilarity.Kind,
Object>
-
_custom
Get the custom plugin-defined variant value.- Throws:
IllegalStateException
- if the current variant is notSettingsSimilarity.Kind._Custom
.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
setupSettingsSimilarityDeserializer
protected static void setupSettingsSimilarityDeserializer(ObjectDeserializer<SettingsSimilarity.Builder> op)
-