Created
July 17, 2023 17:15
-
-
Save R4wm/2a9bfba70c37a4a9154e98f86a3b3f71 to your computer and use it in GitHub Desktop.
delete indexes
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
#!/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