Created
December 28, 2018 07:23
-
-
Save baybatu/2214489fba1ea475f6d69351e5584b72 to your computer and use it in GitHub Desktop.
Delete indices by wildcard pattern in Elasticsearch #elasticsearch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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