Class SemanticPrioritizedFields
java.lang.Object
com.azure.search.documents.indexes.models.SemanticPrioritizedFields
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SemanticPrioritizedFields>
public final class SemanticPrioritizedFields
extends Object
implements com.azure.json.JsonSerializable<SemanticPrioritizedFields>
Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SemanticPrioritizedFields class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SemanticPrioritizedFieldsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SemanticPrioritizedFields from the JsonReader.Get the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers.Get the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers.Get the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and answers.setContentFields(SemanticField... contentFields) Set the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers.setContentFields(List<SemanticField> contentFields) Set the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers.setKeywordsFields(SemanticField... keywordsFields) Set the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers.setKeywordsFields(List<SemanticField> keywordsFields) Set the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers.setTitleField(SemanticField titleField) Set the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and answers.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
-
SemanticPrioritizedFields
public SemanticPrioritizedFields()Creates an instance of SemanticPrioritizedFields class.
-
-
Method Details
-
getTitleField
Get the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and answers. If you don't have a title field in your index, leave this blank.- Returns:
- the titleField value.
-
setTitleField
Set the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and answers. If you don't have a title field in your index, leave this blank.- Parameters:
titleField- the titleField value to set.- Returns:
- the SemanticPrioritizedFields object itself.
-
getContentFields
Get the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain text in natural language form. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.- Returns:
- the contentFields value.
-
setContentFields
Set the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain text in natural language form. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.- Parameters:
contentFields- the contentFields value to set.- Returns:
- the SemanticPrioritizedFields object itself.
-
getKeywordsFields
Get the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.- Returns:
- the keywordsFields value.
-
setKeywordsFields
Set the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.- Parameters:
keywordsFields- the keywordsFields value to set.- Returns:
- the SemanticPrioritizedFields object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SemanticPrioritizedFields>- Throws:
IOException
-
fromJson
public static SemanticPrioritizedFields fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SemanticPrioritizedFields from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SemanticPrioritizedFields 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 SemanticPrioritizedFields.
-
setContentFields
Set the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain text in natural language form. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.- Parameters:
contentFields- the contentFields value to set.- Returns:
- the SemanticPrioritizedFields object itself.
-
setKeywordsFields
Set the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long.- Parameters:
keywordsFields- the keywordsFields value to set.- Returns:
- the SemanticPrioritizedFields object itself.
-