Bird
0
0

Which of the following is the correct JSON structure to create an index named library with 3 shards?

easy📝 Syntax Q3 of 15
Elasticsearch - Index Management
Which of the following is the correct JSON structure to create an index named library with 3 shards?
A{ "library": { "shards": 3 } }
B{ "index": "library", "shards": 3 }
C{ "settings": { "shard_count": 3 } }
D{ "settings": { "number_of_shards": 3 } }
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct JSON format for index creation

    Settings must be inside a "settings" object with key "number_of_shards".
  2. Step 2: Match the correct option

    { "settings": { "number_of_shards": 3 } } correctly uses "settings" and "number_of_shards" keys.
  3. Final Answer:

    { "settings": { "number_of_shards": 3 } } -> Option D
  4. Quick Check:

    Correct JSON keys = { "settings": { "number_of_shards": 3 } } [OK]
Quick Trick: Use "settings" with "number_of_shards" for shard count [OK]
Common Mistakes:
MISTAKES
  • Using wrong key names like "shards" or "shard_count"
  • Placing shards outside settings
  • Wrong nesting of JSON objects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes