Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@baybatu
Created December 28, 2018 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baybatu/2214489fba1ea475f6d69351e5584b72 to your computer and use it in GitHub Desktop.
Save baybatu/2214489fba1ea475f6d69351e5584b72 to your computer and use it in GitHub Desktop.
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"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment