Skip to content

Instantly share code, notes, and snippets.

@R4wm
Created July 17, 2023 17:15
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 R4wm/2a9bfba70c37a4a9154e98f86a3b3f71 to your computer and use it in GitHub Desktop.
Save R4wm/2a9bfba70c37a4a9154e98f86a3b3f71 to your computer and use it in GitHub Desktop.
delete indexes
#!/bin/bash
list_of_index=""
source ~/gitlab/soc/utils/es/cmd/bash_rc
# {
# "error": {
# "root_cause": [
# {
# "type": "too_long_http_line_exception",
# "reason": "An HTTP line is larger than 4096 bytes."
# }
# ],
# "type": "too_long_http_line_exception",
# "reason": "An HTTP line is larger than 4096 bytes."
# },
# "status": 400
# }
# for i in $(indices.sh | awk '{print $3}')
# do
# list_of_index=${list_of_index}$i,
# done
# curl -XDELETE http://localhost:9200/$list_of_index
for i in $(indices.sh | awk '{print $3}')
do
curl -XDELETE localhost:9200/$i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment