Bird
0
0

Given this partial update request:

medium📝 Predict Output Q4 of 15
Elasticsearch - Document Operations
Given this partial update request:
POST /products/_update/10
{
  "doc": {"price": 19.99}
}

What will happen to the document with ID '10'?
AOnly the 'price' field will be updated to 19.99
BThe entire document will be replaced with {"price": 19.99}
CThe document will be deleted
DAn error will occur because 'price' is missing
Step-by-Step Solution
Solution:
  1. Step 1: Understand partial update effect

    Using "doc" updates only specified fields, here 'price' is updated.
  2. Step 2: Confirm no deletion or replacement

    The rest of the document remains unchanged; no deletion or error occurs.
  3. Final Answer:

    Only the 'price' field will be updated to 19.99 -> Option A
  4. Quick Check:

    Partial update changes specified fields only [OK]
Quick Trick: Partial update changes only fields inside "doc" [OK]
Common Mistakes:
MISTAKES
  • Thinking entire document is replaced
  • Assuming document is deleted
  • Expecting error if other fields missing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes