Bird
0
0

Why does Elasticsearch store binary fields as base64 encoded strings instead of raw bytes?

hard🧠 Conceptual Q10 of 15
Elasticsearch - Mappings and Data Types
Why does Elasticsearch store binary fields as base64 encoded strings instead of raw bytes?
ABecause binary fields are faster to search when encoded
BBecause JSON only supports text, so binary data must be encoded
CBecause base64 reduces the size of the data
DBecause Elasticsearch does not support binary data at all
Step-by-Step Solution
Solution:
  1. Step 1: Understand JSON data format

    Elasticsearch uses JSON which supports text, not raw binary bytes.
  2. Step 2: Reason why base64 encoding is used

    Base64 encodes binary data into text so it can be safely stored and transferred in JSON.
  3. Final Answer:

    Because JSON only supports text, so binary data must be encoded -> Option B
  4. Quick Check:

    Binary stored as base64 due to JSON text limitation [OK]
Quick Trick: Binary data is base64 encoded because JSON supports text only [OK]
Common Mistakes:
MISTAKES
  • Thinking base64 reduces data size
  • Assuming Elasticsearch can't store binary
  • Believing encoding improves search speed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes