Bird
0
0

You want to prevent Elasticsearch from automatically adding new fields to your index but still allow existing fields to be indexed. Which mapping setting should you use?

hard🚀 Application Q15 of 15
Elasticsearch - Mappings and Data Types
You want to prevent Elasticsearch from automatically adding new fields to your index but still allow existing fields to be indexed. Which mapping setting should you use?
A"dynamic": "strict"
B"dynamic": "true"
C"dynamic": "false"
D"dynamic": "runtime"
Step-by-Step Solution
Solution:
  1. Step 1: Understand dynamic mapping options

    "dynamic": "true" allows new fields to be added automatically, "false" ignores new fields, "strict" rejects documents with unknown fields.
  2. Step 2: Choose setting to prevent new fields but allow existing

    "strict" rejects documents with new fields, so only existing fields are indexed, preventing unwanted additions.
  3. Final Answer:

    "dynamic": "strict" -> Option A
  4. Quick Check:

    Use strict to block new fields, allow existing [OK]
Quick Trick: Use dynamic: strict to block new fields but keep existing [OK]
Common Mistakes:
MISTAKES
  • Using dynamic: false which ignores new fields silently
  • Using dynamic: true which allows new fields
  • Confusing runtime with dynamic setting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes