Compartir a través de


SemanticPrioritizedFields Class

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

Implements

public final class SemanticPrioritizedFields
implements JsonSerializable<SemanticPrioritizedFields>

Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers.

Constructor Summary

Constructor Description
SemanticPrioritizedFields()

Creates an instance of SemanticPrioritizedFields class.

Method Summary

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

Reads an instance of SemanticPrioritizedFields from the JsonReader.

List<SemanticField> getContentFields()

Get the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers.

List<SemanticField> getKeywordsFields()

Get the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers.

SemanticField getTitleField()

Get the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and answers.

SemanticPrioritizedFields setContentFields(SemanticField[] contentFields)

Set the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers.

SemanticPrioritizedFields setContentFields(List<SemanticField> contentFields)

Set the contentFields property: Defines the content fields to be used for semantic ranking, captions, highlights, and answers.

SemanticPrioritizedFields setKeywordsFields(SemanticField[] keywordsFields)

Set the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers.

SemanticPrioritizedFields setKeywordsFields(List<SemanticField> keywordsFields)

Set the keywordsFields property: Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers.

SemanticPrioritizedFields setTitleField(SemanticField titleField)

Set the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and answers.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SemanticPrioritizedFields

public SemanticPrioritizedFields()

Creates an instance of SemanticPrioritizedFields class.

Method Details

fromJson

public static SemanticPrioritizedFields fromJson(JsonReader jsonReader)

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.

getContentFields

public List 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.

getKeywordsFields

public List 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.

getTitleField

public SemanticField 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.

setContentFields

public SemanticPrioritizedFields setContentFields(SemanticField[] contentFields)

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.

setContentFields

public SemanticPrioritizedFields setContentFields(List contentFields)

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

public SemanticPrioritizedFields setKeywordsFields(SemanticField[] keywordsFields)

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.

setKeywordsFields

public SemanticPrioritizedFields setKeywordsFields(List keywordsFields)

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.

setTitleField

public SemanticPrioritizedFields setTitleField(SemanticField titleField)

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to