Skip to content

Instantly share code, notes, and snippets.

@kyoh86
Last active November 29, 2017 08:06
Show Gist options
  • Save kyoh86/596d0224fb8c25e3a4f7cb8693f04a33 to your computer and use it in GitHub Desktop.
Save kyoh86/596d0224fb8c25e3a4f7cb8693f04a33 to your computer and use it in GitHub Desktop.
Elasticsearchの全てのインデックス設定かえるくん(例はreplicas)
curl -sg 'http://localhost:9200/*/_settings' \
| jq -r 'to_entries
| .[]
| "curl -sg -XPUT http://localhost:9200/"
+ .key + "/_settings -d " + (
{index:{number_of_replicas: 2}}|tojson|@sh
)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment