QueryAnswer Class
- java.
lang. Object - com.
azure. search. documents. models. QueryAnswer
- com.
public final class QueryAnswer
Configuration for how semantic search returns answers to the search.
Constructor Summary
Constructor | Description |
---|---|
QueryAnswer(QueryAnswerType answerType) |
Creates a new instance of QueryAnswer. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Query |
getAnswerType()
Gets the type of answers to generate. |
Integer |
getCount()
Gets the number of answers to generate. |
Double |
getThreshold()
Gets the confidence threshold an answer must match to be included as an answer to the query of answers. |
Query |
setCount(Integer count)
Sets the number of answers to generate. |
Query |
setThreshold(Double threshold)
Sets the confidence threshold an answer must match to be included as an answer to the query of answers. |
Methods inherited from java.lang.Object
Constructor Details
QueryAnswer
public QueryAnswer(QueryAnswerType answerType)
Creates a new instance of QueryAnswer.
Parameters:
Method Details
getAnswerType
public QueryAnswerType getAnswerType()
Gets the type of answers to generate.
Returns:
getCount
public Integer getCount()
Gets the number of answers to generate.
The number of answers to return is optional and will default to 1.
The value only takes effect when getAnswerType() is EXTRACTIVE.
Returns:
getThreshold
public Double getThreshold()
Gets the confidence threshold an answer must match to be included as an answer to the query of answers.
The threshold is optional and will default to 0.7.
The value only takes effect when getAnswerType() is EXTRACTIVE.
Returns:
setCount
public QueryAnswer setCount(Integer count)
Sets the number of answers to generate.
The number of answers to return is optional and will default to 1.
The value only takes effect when getAnswerType() is EXTRACTIVE.
Parameters:
Returns:
setThreshold
public QueryAnswer setThreshold(Double threshold)
Sets the confidence threshold an answer must match to be included as an answer to the query of answers.
The threshold is optional and will default to 0.7.
The value only takes effect when getAnswerType() is EXTRACTIVE.
Parameters:
Returns:
Applies to
Azure SDK for Java