Bird
0
0

What is the result of indexing this document with a binary field?

medium📝 Predict Output Q5 of 15
Elasticsearch - Mappings and Data Types
What is the result of indexing this document with a binary field?
{"file_content": "SGVsbG8gd29ybGQ="}

Assuming file_content is mapped as binary type.
AThe string is stored as plain text
BThe field is ignored during indexing
CThe document fails to index due to invalid binary
DThe base64 string is stored as binary data
Step-by-Step Solution
Solution:
  1. Step 1: Understand binary field storage

    Binary fields expect base64 encoded strings and store them as binary data internally.
  2. Step 2: Check given input

    The string "SGVsbG8gd29ybGQ=" is valid base64 for "Hello world" and will be stored correctly.
  3. Final Answer:

    The base64 string is stored as binary data -> Option D
  4. Quick Check:

    Binary fields store base64 strings as binary [OK]
Quick Trick: Binary fields store base64-encoded strings as binary data [OK]
Common Mistakes:
MISTAKES
  • Thinking binary stores plain text
  • Assuming indexing fails on base64
  • Believing field is ignored

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes