CustomEntity Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.CustomEntity

Implements

public final class CustomEntity
implements JsonSerializable<CustomEntity>

An object that contains information about the matches that were found, and related metadata.

Constructor Summary

Constructor Description
CustomEntity(String name)

Creates an instance of CustomEntity class.

Method Summary

Modifier and Type Method and Description
static CustomEntity fromJson(JsonReader jsonReader)

Reads an instance of CustomEntity from the JsonReader.

List<CustomEntityAlias> getAliases()

Get the aliases property: An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name.

Integer getDefaultFuzzyEditDistance()

Get the defaultFuzzyEditDistance property: Changes the default fuzzy edit distance value for this entity.

String getDescription()

Get the description property: This field can be used as a passthrough for custom metadata about the matched text(s).

Integer getFuzzyEditDistance()

Get the fuzzyEditDistance property: Defaults to 0.

String getId()

Get the id property: This field can be used as a passthrough for custom metadata about the matched text(s).

String getName()

Get the name property: The top-level entity descriptor.

String getSubtype()

Get the subtype property: This field can be used as a passthrough for custom metadata about the matched text(s).

String getType()

Get the type property: This field can be used as a passthrough for custom metadata about the matched text(s).

Boolean isAccentSensitive()

Get the accentSensitive property: Defaults to false.

Boolean isCaseSensitive()

Get the caseSensitive property: Defaults to false.

Boolean isDefaultAccentSensitive()

Get the defaultAccentSensitive property: Changes the default accent sensitivity value for this entity.

Boolean isDefaultCaseSensitive()

Get the defaultCaseSensitive property: Changes the default case sensitivity value for this entity.

CustomEntity setAccentSensitive(Boolean accentSensitive)

Set the accentSensitive property: Defaults to false.

CustomEntity setAliases(List<CustomEntityAlias> aliases)

Set the aliases property: An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name.

CustomEntity setCaseSensitive(Boolean caseSensitive)

Set the caseSensitive property: Defaults to false.

CustomEntity setDefaultAccentSensitive(Boolean defaultAccentSensitive)

Set the defaultAccentSensitive property: Changes the default accent sensitivity value for this entity.

CustomEntity setDefaultCaseSensitive(Boolean defaultCaseSensitive)

Set the defaultCaseSensitive property: Changes the default case sensitivity value for this entity.

CustomEntity setDefaultFuzzyEditDistance(Integer defaultFuzzyEditDistance)

Set the defaultFuzzyEditDistance property: Changes the default fuzzy edit distance value for this entity.

CustomEntity setDescription(String description)

Set the description property: This field can be used as a passthrough for custom metadata about the matched text(s).

CustomEntity setFuzzyEditDistance(Integer fuzzyEditDistance)

Set the fuzzyEditDistance property: Defaults to 0.

CustomEntity setId(String id)

Set the id property: This field can be used as a passthrough for custom metadata about the matched text(s).

CustomEntity setSubtype(String subtype)

Set the subtype property: This field can be used as a passthrough for custom metadata about the matched text(s).

CustomEntity setType(String type)

Set the type property: This field can be used as a passthrough for custom metadata about the matched text(s).

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

CustomEntity

public CustomEntity(String name)

Creates an instance of CustomEntity class.

Parameters:

name - the name value to set.

Method Details

fromJson

public static CustomEntity fromJson(JsonReader jsonReader)

Reads an instance of CustomEntity from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CustomEntity if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getAliases

public List getAliases()

Get the aliases property: An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name.

Returns:

the aliases value.

getDefaultFuzzyEditDistance

public Integer getDefaultFuzzyEditDistance()

Get the defaultFuzzyEditDistance property: Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values.

Returns:

the defaultFuzzyEditDistance value.

getDescription

public String getDescription()

Get the description property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Returns:

the description value.

getFuzzyEditDistance

public Integer getFuzzyEditDistance()

Get the fuzzyEditDistance property: Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do.

Returns:

the fuzzyEditDistance value.

getId

public String getId()

Get the id property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Returns:

the id value.

getName

public String getName()

Get the name property: The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the "normalized" form of the text being found.

Returns:

the name value.

getSubtype

public String getSubtype()

Get the subtype property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Returns:

the subtype value.

getType

public String getType()

Get the type property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Returns:

the type value.

isAccentSensitive

public Boolean isAccentSensitive()

Get the accentSensitive property: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent.

Returns:

the accentSensitive value.

isCaseSensitive

public Boolean isCaseSensitive()

Get the caseSensitive property: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of "Microsoft" could be: microsoft, microSoft, MICROSOFT.

Returns:

the caseSensitive value.

isDefaultAccentSensitive

public Boolean isDefaultAccentSensitive()

Get the defaultAccentSensitive property: Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values.

Returns:

the defaultAccentSensitive value.

isDefaultCaseSensitive

public Boolean isDefaultCaseSensitive()

Get the defaultCaseSensitive property: Changes the default case sensitivity value for this entity. It be used to change the default value of all aliases caseSensitive values.

Returns:

the defaultCaseSensitive value.

setAccentSensitive

public CustomEntity setAccentSensitive(Boolean accentSensitive)

Set the accentSensitive property: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent.

Parameters:

accentSensitive - the accentSensitive value to set.

Returns:

the CustomEntity object itself.

setAliases

public CustomEntity setAliases(List aliases)

Set the aliases property: An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name.

Parameters:

aliases - the aliases value to set.

Returns:

the CustomEntity object itself.

setCaseSensitive

public CustomEntity setCaseSensitive(Boolean caseSensitive)

Set the caseSensitive property: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of "Microsoft" could be: microsoft, microSoft, MICROSOFT.

Parameters:

caseSensitive - the caseSensitive value to set.

Returns:

the CustomEntity object itself.

setDefaultAccentSensitive

public CustomEntity setDefaultAccentSensitive(Boolean defaultAccentSensitive)

Set the defaultAccentSensitive property: Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values.

Parameters:

defaultAccentSensitive - the defaultAccentSensitive value to set.

Returns:

the CustomEntity object itself.

setDefaultCaseSensitive

public CustomEntity setDefaultCaseSensitive(Boolean defaultCaseSensitive)

Set the defaultCaseSensitive property: Changes the default case sensitivity value for this entity. It be used to change the default value of all aliases caseSensitive values.

Parameters:

defaultCaseSensitive - the defaultCaseSensitive value to set.

Returns:

the CustomEntity object itself.

setDefaultFuzzyEditDistance

public CustomEntity setDefaultFuzzyEditDistance(Integer defaultFuzzyEditDistance)

Set the defaultFuzzyEditDistance property: Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values.

Parameters:

defaultFuzzyEditDistance - the defaultFuzzyEditDistance value to set.

Returns:

the CustomEntity object itself.

setDescription

public CustomEntity setDescription(String description)

Set the description property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Parameters:

description - the description value to set.

Returns:

the CustomEntity object itself.

setFuzzyEditDistance

public CustomEntity setFuzzyEditDistance(Integer fuzzyEditDistance)

Set the fuzzyEditDistance property: Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do.

Parameters:

fuzzyEditDistance - the fuzzyEditDistance value to set.

Returns:

the CustomEntity object itself.

setId

public CustomEntity setId(String id)

Set the id property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Parameters:

id - the id value to set.

Returns:

the CustomEntity object itself.

setSubtype

public CustomEntity setSubtype(String subtype)

Set the subtype property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Parameters:

subtype - the subtype value to set.

Returns:

the CustomEntity object itself.

setType

public CustomEntity setType(String type)

Set the type property: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output.

Parameters:

type - the type value to set.

Returns:

the CustomEntity object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to

Azure SDK for Java

Latest