Skip to content

Instantly share code, notes, and snippets.

@adaam
Created February 24, 2021 10:06
Show Gist options
  • Save adaam/af686339ff0a09e85321ecb6de6f6e09 to your computer and use it in GitHub Desktop.
Save adaam/af686339ff0a09e85321ecb6de6f6e09 to your computer and use it in GitHub Desktop.
Set 0 replica and 1 shard for elasticsearch for new index
#!/bin/bash
curl -X PUT "localhost:9200/_template/zero_replica?pretty" -H 'Content-Type: application/json' -d'
{
"index_patterns": ["*"],
"settings": {
"number_of_shards": 1,
"number_of_replicas" : 0
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment