Class SemanticConfiguration
java.lang.Object
com.azure.search.documents.indexes.models.SemanticConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SemanticConfiguration>
public final class SemanticConfiguration
extends Object
implements com.azure.json.JsonSerializable<SemanticConfiguration>
Defines a specific configuration to be used in the context of semantic capabilities.
-
Constructor Summary
ConstructorsConstructorDescriptionSemanticConfiguration(String name, SemanticPrioritizedFields prioritizedFields) Creates an instance of SemanticConfiguration class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SemanticConfigurationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SemanticConfiguration from the JsonReader.getName()Get the name property: The name of the semantic configuration.Get the prioritizedFields property: Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers.Get the flightingOptIn property: Determines how which semantic or query rewrite models to use during model flighting/upgrades.setFlightingOptIn(Boolean flightingOptIn) Set the flightingOptIn property: Determines how which semantic or query rewrite models to use during model flighting/upgrades.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
-
SemanticConfiguration
Creates an instance of SemanticConfiguration class.- Parameters:
name- the name value to set.prioritizedFields- the prioritizedFields value to set.
-
-
Method Details
-
getName
Get the name property: The name of the semantic configuration.- Returns:
- the name value.
-
getPrioritizedFields
Get the prioritizedFields property: Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set.- Returns:
- the prioritizedFields value.
-
isFlightingOptIn
Get the flightingOptIn property: Determines how which semantic or query rewrite models to use during model flighting/upgrades.- Returns:
- the flightingOptIn value.
-
setFlightingOptIn
Set the flightingOptIn property: Determines how which semantic or query rewrite models to use during model flighting/upgrades.- Parameters:
flightingOptIn- the flightingOptIn value to set.- Returns:
- the SemanticConfiguration object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SemanticConfiguration>- Throws:
IOException
-
fromJson
public static SemanticConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SemanticConfiguration from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SemanticConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SemanticConfiguration.
-