SemanticPrioritizedFields Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. SemanticPrioritizedFields
- com.
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 Semantic |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Semantic |
fromJson(JsonReader jsonReader)
Reads an instance of Semantic |
List<Semantic |
getContentFields()
Get the content |
List<Semantic |
getKeywordsFields()
Get the keywords |
Semantic |
getTitleField()
Get the title |
Semantic |
setContentFields(SemanticField[] contentFields)
Set the content |
Semantic |
setContentFields(List<SemanticField> contentFields)
Set the content |
Semantic |
setKeywordsFields(SemanticField[] keywordsFields)
Set the keywords |
Semantic |
setKeywordsFields(List<SemanticField> keywordsFields)
Set the keywords |
Semantic |
setTitleField(SemanticField titleField)
Set the title |
Json |
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:
Returns:
Throws:
getContentFields
public List
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:
getKeywordsFields
public List
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:
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:
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:
Returns:
setContentFields
public SemanticPrioritizedFields setContentFields(List
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:
Returns:
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:
Returns:
setKeywordsFields
public SemanticPrioritizedFields setKeywordsFields(List
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:
Returns:
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:
Returns:
toJson
Applies to
Azure SDK for Java