QueryAnswerType Class
- java.
lang. Object - com.
azure. core. util. ExpandableStringEnum<T> - com.
azure. search. documents. models. QueryAnswerType
- com.
- com.
public final class QueryAnswerType
extends 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-` 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.
Field Summary
Modifier and Type | Field and Description |
---|---|
static final
Query |
EXTRACTIVE
Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language. |
static final
Query |
NONE
Do not return answers for the query. |
Constructor Summary
Constructor | Description |
---|---|
QueryAnswerType() |
Deprecated
Use the fromString(String name) factory method.
Creates a new instance of Query |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Query |
fromString(String name)
Creates or finds a Query |
static
Collection<Query |
values()
Gets known Query |
Methods inherited from ExpandableStringEnum
Methods inherited from java.lang.Object
Field Details
EXTRACTIVE
public static final QueryAnswerType EXTRACTIVE
Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language.
NONE
public static final QueryAnswerType NONE
Do not return answers for the query.
Constructor Details
QueryAnswerType
@Deprecated
public QueryAnswerType()
Deprecated
Creates a new instance of QueryAnswerType value.
Method Details
fromString
public static QueryAnswerType fromString(String name)
Creates or finds a QueryAnswerType from its string representation.
Parameters:
Returns:
values
public static Collection
Gets known QueryAnswerType values.
Returns:
Applies to
Azure SDK for Java