Bird
0
0

You tried to define a mapping with this snippet:

medium📝 Debug Q7 of 15
Elasticsearch - Mappings and Data Types
You tried to define a mapping with this snippet:
{ "properties": { "age": "integer" } }
but got an error. What is wrong?
AInteger type is not supported in Elasticsearch mappings
BField name "age" is reserved and cannot be used
CField type must be inside an object with key "type", not a string
DProperties key must be an array, not an object
Step-by-Step Solution
Solution:
  1. Step 1: Review correct mapping syntax for fields

    Each field must be an object with a "type" key specifying the data type.
  2. Step 2: Identify the error in the snippet

    The snippet assigns a string directly instead of an object with "type" key.
  3. Final Answer:

    Field type must be inside an object with key "type", not a string -> Option C
  4. Quick Check:

    Field type requires "type" key = A [OK]
Quick Trick: Field type must be inside an object with "type" key [OK]
Common Mistakes:
MISTAKES
  • Assigning type as a string directly
  • Thinking field names are reserved
  • Misunderstanding properties structure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes