A. Missing comma between query and wait_for_completion_timeout fields.
B. Using POST instead of GET method.
C. wait_for_completion_timeout cannot be set in the request body.
D. The field name "title" is invalid in match query.
Solution
Step 1: Check JSON syntax
The JSON body is missing a comma after the closing brace of the "query" object.
Step 2: Validate method and fields
POST is correct method, wait_for_completion_timeout is valid in body, and "title" is a valid field name.
Final Answer:
Missing comma between query and wait_for_completion_timeout fields. -> Option A
Quick Check:
JSON syntax error = missing comma [OK]
Hint: Check commas between JSON fields carefully [OK]
Common Mistakes:
Forgetting commas between JSON objects
Confusing HTTP methods for async search
Misplacing wait_for_completion_timeout outside body
5. You want to run a very expensive aggregation query on a large dataset without timing out. Which approach using async search is best to get the final results efficiently?
hard
A. Run a normal search with a very high timeout value to wait for results.
B. Start async search with a long wait_for_completion_timeout and poll using the returned id until results are ready.
C. Start async search and immediately request results without waiting for completion.
D. Run the query multiple times with smaller timeouts and merge results manually.
Solution
Step 1: Understand async search timeout and polling
Setting a reasonable wait_for_completion_timeout lets the server try to finish quickly but returns control if it takes longer.
Step 2: Use the returned id to poll for completion
You can check the status later using the id until the results are ready, avoiding timeouts and blocking.
Final Answer:
Start async search with a long wait_for_completion_timeout and poll using the returned id until results are ready. -> Option B
Quick Check:
Async search + polling = efficient for expensive queries [OK]
Hint: Use wait_for_completion_timeout + poll with id for big queries [OK]
Common Mistakes:
Using normal search with high timeout risking app freeze
Requesting results immediately before completion
Manually merging partial results instead of async search
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.