Class SynonymMap
java.lang.Object
com.azure.search.documents.indexes.models.SynonymMap
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SynonymMap>
Represents a synonym map definition.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SynonymMap class.SynonymMap(String name) Constructor ofSynonymMap.SynonymMap(String name, String synonyms) Constructor ofSynonymMap. -
Method Summary
Modifier and TypeMethodDescriptionstatic SynonymMapcreateFromFile(String name, Path filePath) Creates a new instance of SynonymMap with synonyms read from the passed file.static SynonymMapfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SynonymMap from the JsonReader.Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.getETag()Get the eTag property: The ETag of the synonym map.getName()Get the name property: The name of the synonym map.Get the synonyms property: A series of synonym rules in the specified synonym map format.setEncryptionKey(SearchResourceEncryptionKey encryptionKey) Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.Set the eTag property: The ETag of the synonym map.setSynonyms(String synonyms) Set the synonyms property: A series of synonym rules in the specified synonym map format.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SynonymMap
public SynonymMap()Creates an instance of SynonymMap class. -
SynonymMap
Constructor ofSynonymMap.- Parameters:
name- The name of the synonym map.
-
SynonymMap
Constructor ofSynonymMap.- Parameters:
name- The name of the synonym map.synonyms- A series of synonym rules in the specified synonym map format. The rules must be separated by newlines.
-
-
Method Details
-
getName
Get the name property: The name of the synonym map.- Returns:
- the name value.
-
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.
-
setSynonyms
Set the synonyms property: A series of synonym rules in the specified synonym map format. The rules must be separated by newlines.- Parameters:
synonyms- the synonyms value to set.- Returns:
- the SynonymMap object itself.
-
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.
-
setEncryptionKey
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.
-
getETag
Get the eTag property: The ETag of the synonym map.- Returns:
- the eTag value.
-
setETag
Set the eTag property: The ETag of the synonym map.- Parameters:
eTag- the eTag value to set.- Returns:
- the SynonymMap object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SynonymMap>- Throws:
IOException
-
fromJson
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 an error occurs while reading the SynonymMap.
-
createFromFile
Creates a new instance of SynonymMap with synonyms read from the passed file.- Parameters:
name- The name of the synonym map.filePath- The path to the file where the formatted synonyms are read.- Returns:
- A SynonymMap.
- Throws:
UncheckedIOException- If readingfilePathfails.
-