Bird
Raised Fist0

Which of the following is the correct syntax to update the number of replicas to 3 for an existing index named my_index?

easy📝 Syntax Q3 of Q15
Elasticsearch - Performance and Scaling

Which of the following is the correct syntax to update the number of replicas to 3 for an existing index named my_index?

APOST /my_index/_settings { "number_of_replicas": 3 }
BDELETE /my_index/_settings { "number_of_replicas": 3 }
CGET /my_index/_settings { "number_of_replicas": 3 }
DPUT /my_index/_settings { "number_of_replicas": 3 }
Step-by-Step Solution
Solution:
  1. Step 1: Identify HTTP method to update settings

    Updating index settings uses the PUT method in Elasticsearch.
  2. Step 2: Confirm correct endpoint and payload

    The endpoint is /my_index/_settings with JSON body setting number_of_replicas.
  3. Final Answer:

    PUT /my_index/_settings { "number_of_replicas": 3 } -> Option D
  4. Quick Check:

    Update replicas = PUT method [OK]
Quick Trick: Use PUT to update index settings like replicas [OK]
Common Mistakes:
MISTAKES
  • Using POST instead of PUT for settings update
  • Using GET or DELETE which are incorrect here
  • Wrong endpoint or missing JSON body

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes