Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Delete indices by wildcard pattern in Elasticsearch #elasticsearch
for index_name in `curl -XGET "$ES_HOST/products_*" | jq -r 'keys[]'`; do
curl -XDELETE "$ES_HOST/$index_name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.