Bird
0
0

Why does the _update API in Elasticsearch not replace the entire document by default when updating fields?

hard🧠 Conceptual Q10 of 15
Elasticsearch - Document Operations
Why does the _update API in Elasticsearch not replace the entire document by default when updating fields?
ATo avoid accidental deletion of fields not included in the update
BBecause Elasticsearch does not support full document replacement
CTo improve performance by sending only changed fields
DBecause the update API only works with scripts
Step-by-Step Solution
Solution:
  1. Step 1: Understand update API behavior

    The update API modifies specified fields without replacing the whole document.
  2. Step 2: Reason why partial update is default

    This prevents accidental loss of fields not included in the update, preserving data integrity.
  3. Final Answer:

    To avoid accidental deletion of fields not included in the update -> Option A
  4. Quick Check:

    Partial update prevents data loss = To avoid accidental deletion of fields not included in the update [OK]
Quick Trick: Partial updates protect existing fields from deletion [OK]
Common Mistakes:
MISTAKES
  • Thinking update replaces whole document
  • Believing Elasticsearch lacks full replacement
  • Assuming update only uses scripts

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes