Class QueryAnswerType
java.lang.Object
com.azure.core.util.ExpandableStringEnum<QueryAnswerType>
com.azure.search.documents.models.QueryAnswerType
- All Implemented Interfaces:
com.azure.core.util.ExpandableEnum<String>
public final class QueryAnswerType
extends com.azure.core.util.ExpandableStringEnum<QueryAnswerType>
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-<number of answers>` 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-<confidence threshold>` option after the answers parameter value, such as
`extractive|threshold-0.9`. Default threshold is 0.7. The maximum character length of answers can be configured by
appending the pipe character '|' followed by the 'count-<number of maximum character length>', such as
'extractive|maxcharlength-600'.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QueryAnswerTypeExtracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language.static final QueryAnswerTypeDo not return answers for the query. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryAnswerTypefromString(String name) Creates or finds a QueryAnswerType from its string representation.static Collection<QueryAnswerType> values()Gets known QueryAnswerType values.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, getValue, hashCode, toString, values
-
Field Details
-
NONE
Do not return answers for the query. -
EXTRACTIVE
Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language.
-
-
Constructor Details
-
QueryAnswerType
Deprecated.Use thefromString(String)factory method.Creates a new instance of QueryAnswerType value.
-
-
Method Details
-
fromString
Creates or finds a QueryAnswerType from its string representation.- Parameters:
name- a name to look for.- Returns:
- the corresponding QueryAnswerType.
-
values
Gets known QueryAnswerType values.- Returns:
- known QueryAnswerType values.
-
fromString(String)factory method.