Challenge - 5 Problems
Async Search Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this async search initiation?
Given the following Elasticsearch async search request, what is the expected immediate response field that indicates the search is running asynchronously?
Elasticsearch
{
"index": "products",
"body": {
"query": {
"match_all": {}
}
},
"wait_for_completion_timeout": "1s",
"keep_alive": "5m"
}Attempts:
2 left
💡 Hint
Async search returns a search ID to track progress, not full results immediately.
✗ Incorrect
When you start an async search with a short wait_for_completion_timeout, Elasticsearch returns an "id" field. This ID lets you check the search status later. The full results are not returned immediately.
🧠 Conceptual
intermediate1:30remaining
Why use async search for expensive queries?
Which reason best explains why async search is preferred for expensive or long-running Elasticsearch queries?
Attempts:
2 left
💡 Hint
Think about how async search helps with long wait times.
✗ Incorrect
Async search lets clients start a query and get a search ID immediately. Clients can then poll for results later, avoiding long blocking waits and improving responsiveness.
🔧 Debug
advanced2:00remaining
Identify the error in this async search status request
This request tries to get the status of an async search but fails. What is the cause?
Elasticsearch
GET /_async_search/status
{
"id": "r1a2b3c4d5e6f7g8h9"
}Attempts:
2 left
💡 Hint
Check how the async search ID is passed in the API.
✗ Incorrect
To get async search status, the search ID must be part of the URL path, like GET /_async_search/status/{id}. Passing it in the body causes an error.
📝 Syntax
advanced2:00remaining
Which async search request syntax is correct?
Choose the correct syntax to start an async search with a 2-second wait and 10-minute keep alive.
Attempts:
2 left
💡 Hint
Check the correct HTTP method and parameter placement for async search.
✗ Incorrect
Async search parameters like wait_for_completion_timeout and keep_alive are passed as URL query parameters. The method must be POST to /_async_search.
🚀 Application
expert2:30remaining
How to retrieve final results of an async search?
After starting an async search and receiving the search ID "abc123", which request correctly retrieves the final results once the search is complete?
Attempts:
2 left
💡 Hint
Think about the endpoint to get results by search ID.
✗ Incorrect
To get the final results of an async search, you use GET /_async_search/{id}. The status endpoint only returns progress info.