0
0
Elasticsearchquery~10 mins

Async search for expensive queries in Elasticsearch - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start an async search request.

Elasticsearch
POST /[1]
{
  "query": {
    "match_all": {}
  }
}
Drag options to blanks, or click blank then click option'
Aquery
Bstart
Crun
D_async_search
Attempts:
3 left
💡 Hint
Common Mistakes
Using /start which is not a valid endpoint.
Using /query which is incorrect.
2fill in blank
medium

Complete the code to retrieve the async search result by ID.

Elasticsearch
GET /_async_search/[1]
Drag options to blanks, or click blank then click option'
Asearch_id
Bstatus
Cyour_async_search_id
Dresult
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic words like 'result' or 'status' instead of the actual ID.
Trying to get results without specifying the ID.
3fill in blank
hard

Fix the error in the async search request to set the wait_for_completion_timeout to 1 second.

Elasticsearch
POST /_async_search?[1]=1s
{
  "query": {
    "match_all": {}
  }
}
Drag options to blanks, or click blank then click option'
Await_timeout
Bwait_for_completion_timeout
Ctimeout
Dcompletion_timeout
Attempts:
3 left
💡 Hint
Common Mistakes
Using shortened or incorrect parameter names like 'timeout' or 'wait_timeout'.
Misspelling the parameter name.
4fill in blank
hard

Fill both blanks to create an async search request that keeps the search alive for 5 minutes and returns partial results.

Elasticsearch
POST /_async_search?[1]=5m&[2]=0s
{
  "query": {
    "match": {
      "message": "error"
    }
  }
}
Drag options to blanks, or click blank then click option'
Akeep_alive
Bwait_for_completion_timeout
Cbatched_reduce_size
Dkeep_on_partial
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing keep_alive with wait_for_completion_timeout.
Using parameters that do not exist like keep_on_partial.
5fill in blank
hard

Fill in the blank to create a request that cancels an async search by its ID.

Elasticsearch
DELETE /_async_search/[1]
Drag options to blanks, or click blank then click option'
Ayour_async_search_id
Bid
Ccancel
Dsearch_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cancel' as the ID in the path.
Adding unnecessary query parameters like ?id=...