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 StringGet the actual kind when_kind()equalsSettingsSimilarity.Kind._Custom(plugin-defined variant).final Object_get()booleanIs this a customSettingsSimilaritydefined by a plugin?final SettingsSimilarity.Kind_kind()Get the of the kind of variant held by this object.bm25()Get theBM25variant value.boolean_()Get thebooleanvariant value.dfi()Get theDFIvariant value.dfr()Get theDFRvariant value.ib()Get theIBvariant value.booleanisBm25()Is this variant instance of kindBM25?booleanIs this variant instance of kindboolean?booleanisDfi()Is this variant instance of kindDFI?booleanisDfr()Is this variant instance of kindDFR?booleanisIb()Is this variant instance of kindIB?booleanIs this variant instance of kindLMDirichlet?booleanIs this variant instance of kindLMJelinekMercer?booleanIs this variant instance of kindscripted?Get theLMDirichletvariant value.Get theLMJelinekMercervariant value.static SettingsSimilarityscripted()Get thescriptedvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()
-
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:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<SettingsSimilarity.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin 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 theBM25variant value.- Throws:
IllegalStateException- if the current variant is not of theBM25kind.
-
isBoolean
public boolean isBoolean()Is this variant instance of kindboolean? -
boolean_
Get thebooleanvariant value.- Throws:
IllegalStateException- if the current variant is not of thebooleankind.
-
isDfi
public boolean isDfi()Is this variant instance of kindDFI? -
dfi
Get theDFIvariant value.- Throws:
IllegalStateException- if the current variant is not of theDFIkind.
-
isDfr
public boolean isDfr()Is this variant instance of kindDFR? -
dfr
Get theDFRvariant value.- Throws:
IllegalStateException- if the current variant is not of theDFRkind.
-
isIb
public boolean isIb()Is this variant instance of kindIB? -
ib
Get theIBvariant value.- Throws:
IllegalStateException- if the current variant is not of theIBkind.
-
isLMDirichlet
public boolean isLMDirichlet()Is this variant instance of kindLMDirichlet? -
lmdirichlet
Get theLMDirichletvariant value.- Throws:
IllegalStateException- if the current variant is not of theLMDirichletkind.
-
isLMJelinekMercer
public boolean isLMJelinekMercer()Is this variant instance of kindLMJelinekMercer? -
lmjelinekmercer
Get theLMJelinekMercervariant value.- Throws:
IllegalStateException- if the current variant is not of theLMJelinekMercerkind.
-
isScripted
public boolean isScripted()Is this variant instance of kindscripted? -
scripted
Get thescriptedvariant value.- Throws:
IllegalStateException- if the current variant is not of thescriptedkind.
-
_isCustom
public boolean _isCustom()Is this a customSettingsSimilaritydefined by a plugin? -
_customKind
Get the actual kind when_kind()equalsSettingsSimilarity.Kind._Custom(plugin-defined variant).- Specified by:
_customKindin 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:
serializein interfaceJsonpSerializable
-
toString
-
setupSettingsSimilarityDeserializer
protected static void setupSettingsSimilarityDeserializer(ObjectDeserializer<SettingsSimilarity.Builder> op)
-