SynonymMap Class

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

Implements

public final class SynonymMap
implements JsonSerializable<SynonymMap>

Represents a synonym map definition.

Constructor Summary

Constructor Description
SynonymMap(String name, String[] synonyms)

Creates an instance of SynonymMap class.

SynonymMap(String name, List<String> synonyms)

Creates an instance of SynonymMap class.

Method Summary

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

Reads an instance of SynonymMap from the JsonReader.

SearchResourceEncryptionKey getEncryptionKey()

Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

String getETag()

Get the eTag property: The ETag of the synonym map.

String getFormat()

Get the format property: The format of the synonym map.

String getName()

Get the name property: The name of the synonym map.

List<String> getSynonyms()

Get the synonyms property: A series of synonym rules in the specified synonym map format.

SynonymMap setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

SynonymMap setETag(String eTag)

Set the eTag property: The ETag of the synonym map.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SynonymMap

public SynonymMap(String name, String[] synonyms)

Creates an instance of SynonymMap class.

Parameters:

name - the name value to set.
synonyms - the synonyms value to set.

SynonymMap

public SynonymMap(String name, List<String> synonyms)

Creates an instance of SynonymMap class.

Parameters:

name - the name value to set.
synonyms - the synonyms value to set.

Method Details

fromJson

public static SynonymMap fromJson(JsonReader jsonReader)

Reads an instance of SynonymMap from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SynonymMap 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.

getEncryptionKey

public SearchResourceEncryptionKey getEncryptionKey()

Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data. Once you have encrypted your data, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

Returns:

the encryptionKey value.

getETag

public String getETag()

Get the eTag property: The ETag of the synonym map.

Returns:

the eTag value.

getFormat

public String getFormat()

Get the format property: The format of the synonym map. Only the 'solr' format is currently supported.

Returns:

the format value.

getName

public String getName()

Get the name property: The name of the synonym map.

Returns:

the name value.

getSynonyms

public List<String> getSynonyms()

Get the synonyms property: A series of synonym rules in the specified synonym map format. The rules must be separated by newlines.

Returns:

the synonyms value.

setEncryptionKey

public SynonymMap setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data. Once you have encrypted your data, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

Parameters:

encryptionKey - the encryptionKey value to set.

Returns:

the SynonymMap object itself.

setETag

public SynonymMap setETag(String eTag)

Set the eTag property: The ETag of the synonym map.

Parameters:

eTag - the eTag value to set.

Returns:

the SynonymMap object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to