SemanticConfiguration Class

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

Implements

public final class SemanticConfiguration
implements JsonSerializable<SemanticConfiguration>

Defines a specific configuration to be used in the context of semantic capabilities.

Constructor Summary

Constructor Description
SemanticConfiguration(String name, SemanticPrioritizedFields prioritizedFields)

Creates an instance of SemanticConfiguration class.

Method Summary

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

Reads an instance of SemanticConfiguration from the JsonReader.

String getName()

Get the name property: The name of the semantic configuration.

SemanticPrioritizedFields getPrioritizedFields()

Get the prioritizedFields property: Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

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

fromJson

public static SemanticConfiguration fromJson(JsonReader jsonReader)

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:

IOException

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

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to