Find Answers
nluReadAnswers
ACL
Not implemented yet.
About this method
You are currently reading the JavaScript API client v4 documentation. Check our migration guide to learn how to upgrade from v3 to v4. You can still access the v3 documentation.
You are currently reading the Ruby API client v2 documentation. Check our migration guide to learn how to upgrade from v1 to v2. You can still access the v1 documentation.
Search your index with natural-language understanding (NLU) AI using Algolia Answers.
Examples
1
// Not implemented yet
Parameters
query
|
type: object
Required
An AnswersQuery object. |
requestOptions
|
type: key-value mapping
default: No request options
Optional
A mapping of |
AnswersQuery
query
|
type: string
Required
The query for which to retrieve results. Can’t be empty or a whitespace string. |
queryLanguages
|
type: array
default: ["en"]
Required
The languages in the query. Only supports |
attributesForPrediction
|
default: ["*"]
Required
Attributes to use for predictions. Uses all |
nbHits
|
type: int
default: 10
Optional
Number of answers to retrieve from the Answers Engine. Can’t be greater than 1000. |
threshold
|
type: float
default: 0.0
Optional
Threshold for the answers’ confidence score. The Answers Engine returns answers with extracts that score higher than this threshold. |
params
|
type: object
Optional
Algolia search parameters to use to fetch the hits. Can be any search parameter, except: |
Response
In this section we document the JSON response returned by the API. Each language will encapsulate this response inside objects specific to the language and/or the implementation. So the actual type in your language might differ from what is documented.
JSON format
1
2
3
4
5
{
"extract": "Pop quiz: When does <em>learning</em> begin? Answer: Before we are born. Science writer Annie Murphy Paul talks through new research that shows how much we learn in the womb -- from the lilt of our native language to our soon-to-be-favorite foods.",
"score": 212.239,
"extractAttribute": "description"
}
_answer
extract
|
string
The excerpt from the hit best answering the query. |
extractAttribute
|
string
The attribute from which the answer was extracted. Only returned when you set |
score
|
float
The confidence score for this answer. Higher scores are better, with a score of |