Bird
0
0

You set number_of_replicas to -1 in your index settings. What will Elasticsearch do?

medium📝 Debug Q7 of 15
Elasticsearch - Index Management
You set number_of_replicas to -1 in your index settings. What will Elasticsearch do?
AThrow an error due to invalid replica count
BSet replicas to zero (no replicas)
CSet replicas to one by default
DIgnore the setting and keep previous value
Step-by-Step Solution
Solution:
  1. Step 1: Validate replica count rules

    Replica count must be zero or positive integer; negative values are invalid.
  2. Step 2: Elasticsearch behavior on invalid settings

    Setting replicas to -1 causes an error because it is not allowed.
  3. Final Answer:

    Throw an error due to invalid replica count -> Option A
  4. Quick Check:

    Replica count must be ≥ 0 [OK]
Quick Trick: Replica count cannot be negative [OK]
Common Mistakes:
MISTAKES
  • Assuming negative replicas mean zero
  • Expecting silent ignore
  • Confusing replicas with shards

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes