SemanticSearchOptions Class
- java.
lang. Object - com.
azure. search. documents. models. SemanticSearchOptions
- com.
public final class SemanticSearchOptions
Parameters for performing vector searches.
Constructor Summary
Constructor | Description |
---|---|
SemanticSearchOptions() |
Creates a new instance of SemanticSearchOptions. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Semantic |
getErrorMode()
Get the semantic |
Duration |
getMaxWaitDuration()
Get the semantic |
Query |
getQueryAnswer()
Get the answers property: This parameter is only valid if the query type is 'semantic'. |
Query |
getQueryCaption()
Get the query caption property: This parameter is only valid if the query type is 'semantic'. |
String |
getSemanticConfigurationName()
Get the semantic |
Semantic |
setErrorMode(SemanticErrorMode errorMode)
Set the semantic |
Semantic |
setMaxWaitDuration(Duration maxWaitDuration)
Set the semantic |
Semantic |
setQueryAnswer(QueryAnswer queryAnswer)
Set the answers property: This parameter is only valid if the query type is 'semantic'. |
Semantic |
setQueryCaption(QueryCaption queryCaption)
Set the query caption property: This parameter is only valid if the query type is 'semantic'. |
Semantic |
setSemanticConfigurationName(String semanticConfigurationName)
Set the semantic |
Methods inherited from java.lang.Object
Constructor Details
SemanticSearchOptions
public SemanticSearchOptions()
Creates a new instance of SemanticSearchOptions.
Method Details
getErrorMode
public SemanticErrorMode getErrorMode()
Get the semanticErrorHandling property: Allows the user to choose whether a semantic call should fail completely, or to return partial results.
Returns:
getMaxWaitDuration
public Duration getMaxWaitDuration()
Get the semanticMaxWaitInMilliseconds property: Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.
Returns:
getQueryAnswer
public QueryAnswer getQueryAnswer()
Get the answers property: This parameter is only valid if the query type is 'semantic'. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character '|' followed by the 'count-' option after the answers parameter value, such as 'extractive|count-3'. Default count is 1. The confidence threshold can be configured by appending the pipe character '|' followed by the 'threshold-' option after the answers parameter value, such as 'extractive|threshold-0.9'. Default threshold is 0.7.
Returns:
getQueryCaption
public QueryCaption getQueryCaption()
Get the query caption property: This parameter is only valid if the query type is 'semantic'. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to 'extractive', highlighting is enabled by default, and can be configured by appending the pipe character '|' followed by the 'highlight-<true/false>' option, such as 'extractive|highlight-true'. Defaults to 'None'.
Returns:
getSemanticConfigurationName
public String getSemanticConfigurationName()
Get the semanticConfigurationName property: The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers.
Returns:
setErrorMode
public SemanticSearchOptions setErrorMode(SemanticErrorMode errorMode)
Set the semanticErrorHandling property: Allows the user to choose whether a semantic call should fail completely, or to return partial results.
Parameters:
Returns:
setMaxWaitDuration
public SemanticSearchOptions setMaxWaitDuration(Duration maxWaitDuration)
Set the semanticMaxWaitDuration property: Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.
Parameters:
Returns:
setQueryAnswer
public SemanticSearchOptions setQueryAnswer(QueryAnswer queryAnswer)
Set the answers property: This parameter is only valid if the query type is 'semantic'. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character '|' followed by the 'count-' option after the answers parameter value, such as 'extractive|count-3'. Default count is 1. The confidence threshold can be configured by appending the pipe character '|' followed by the 'threshold-' option after the answers parameter value, such as 'extractive|threshold-0.9'. Default threshold is 0.7.
Parameters:
Returns:
setQueryCaption
public SemanticSearchOptions setQueryCaption(QueryCaption queryCaption)
Set the query caption property: This parameter is only valid if the query type is 'semantic'. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to 'extractive', highlighting is enabled by default, and can be configured by appending the pipe character '|' followed by the 'highlight-<true/false>' option, such as 'extractive|highlight-true'. Defaults to 'None'.
Parameters:
Returns:
setSemanticConfigurationName
public SemanticSearchOptions setSemanticConfigurationName(String semanticConfigurationName)
Set the semanticConfigurationName property: The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers.
Parameters:
Returns:
Applies to
Azure SDK for Java
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기