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 Details

    • SemanticConfiguration

      public SemanticConfiguration(String name, SemanticPrioritizedFields prioritizedFields)
      Creates an instance of SemanticConfiguration class.
      Parameters:
      name - the name value to set.
      prioritizedFields - the prioritizedFields value to set.
  • Method Details

    • getName

      public String getName()
      Get the name property: The name of the semantic configuration.
      Returns:
      the name value.
    • getPrioritizedFields

      public SemanticPrioritizedFields 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

      public Boolean isFlightingOptIn()
      Get the flightingOptIn property: Determines how which semantic or query rewrite models to use during model flighting/upgrades.
      Returns:
      the flightingOptIn value.
    • setFlightingOptIn

      public SemanticConfiguration setFlightingOptIn(Boolean flightingOptIn)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.