Bird
0
0

Given this request to create an index:

medium📝 query result Q4 of 15
Elasticsearch - Index Management
Given this request to create an index:
{ "settings": { "number_of_shards": 2 }, "mappings": { "properties": { "title": { "type": "text" } } } }

What will be the number of shards for this index?
A1
B2
C3
DUndefined
Step-by-Step Solution
Solution:
  1. Step 1: Read the JSON settings

    The JSON specifies "number_of_shards" as 2 inside "settings".
  2. Step 2: Understand shard count meaning

    The index will be created with 2 shards as explicitly set.
  3. Final Answer:

    2 -> Option B
  4. Quick Check:

    Shard count = 2 [OK]
Quick Trick: Check "number_of_shards" in settings for shard count [OK]
Common Mistakes:
MISTAKES
  • Assuming default shard count 1
  • Ignoring settings section
  • Confusing shards with replicas

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes