Bird
0
0

Why does Elasticsearch return the entire document source when retrieving by ID, even if you only want a few fields?

hard🧠 Conceptual Q10 of 15
Elasticsearch - Document Operations
Why does Elasticsearch return the entire document source when retrieving by ID, even if you only want a few fields?
ABecause Elasticsearch does not support field filtering
BBecause the GET by ID API returns the full _source by default
CBecause the document ID is not indexed
DBecause the _doc endpoint only returns metadata
Step-by-Step Solution
Solution:
  1. Step 1: Understand default behavior of GET by ID

    By default, GET /index/_doc/id returns the full _source document.
  2. Step 2: Clarify why full source is returned

    Field filtering requires explicit _source parameter; otherwise, full source is sent.
  3. Final Answer:

    Because the GET by ID API returns the full _source by default -> Option B
  4. Quick Check:

    GET by ID returns full _source unless filtered [OK]
Quick Trick: GET by ID returns full document unless _source filters used [OK]
Common Mistakes:
MISTAKES
  • Thinking field filtering is unsupported
  • Confusing ID indexing with source retrieval
  • Assuming _doc returns only metadata

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes