curl -X GET http:/ES_URL:9200/_cat/indices | grep open
curl -X GET http:/ES_URL:9200/_cat/indices | grep close
curl -X GET http:/ES_URL:9200/_cat/indices | grep close | sort | awk '{print $2}'
curl -X DELETE http:/ES_URL:9200/index_pattern\*
for i in `cat ES_INDEX_LIST_FILE`;do curl -X POST http:/ES_URL:9200/$i/_close; done
for i in `cat ES_INDEX_LIST_FILE`;do curl -X DELETE http:/ES_URL:9200/$i; done
curl -XPOST 'http://ES_URL:9200/test_index-test/_doc' \
\ -H 'Content-Type: application/json' \
\ -u user:password \
\ -d '{
"field1": "value1",
"field2": "value2"
}'
curl -X PUT http://ES_URL:9200/_cluster/settings -H "Content-Type: application/json" -d'
{
"transient": {
"cluster.routing.allocation.enable": "none"
}
}
curl -X GET http://ES IP:9200/_cluster/settings
curl -X POST http://ES IP:9200/_flush/synced
curl -X PUT http://ES IP:9200/_cluster/settings -H "Content-Type: application/json" -d'
{
"transient": {
"cluster.routing.allocation.enable": "all"
}
}'