Bird
0
0

You want to delete all documents matching a query using the Bulk API. Which approach correctly combines Bulk API with a query to delete multiple documents?

hard🚀 Application Q9 of 15
Elasticsearch - Document Operations
You want to delete all documents matching a query using the Bulk API. Which approach correctly combines Bulk API with a query to delete multiple documents?
AUse the Delete By Query API instead of Bulk API for query-based deletes.
BBulk API automatically deletes documents matching a query if you specify the query in the header.
CSend a single delete action with a query in the Bulk API request body.
DSend a Bulk API request with multiple delete actions, each specifying _id from the query results.
Step-by-Step Solution
Solution:
  1. Step 1: Understand Bulk API limitations

    Bulk API requires explicit document _id for delete actions; it does not accept queries directly.
  2. Step 2: Analyze options

    Send a Bulk API request with multiple delete actions, each specifying _id from the query results. correctly describes sending multiple delete actions with _id values obtained from a query.
  3. Final Answer:

    Send a Bulk API request with multiple delete actions, each specifying _id from the query results. -> Option D
  4. Quick Check:

    Bulk API deletes need explicit _id per document [OK]
Quick Trick: Bulk API deletes need explicit _id; use Delete By Query for queries [OK]
Common Mistakes:
MISTAKES
  • Trying to delete by query inside Bulk API
  • Assuming Bulk API accepts query in delete action
  • Believing Bulk API auto-deletes by query

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes