Delete index elasticsearch
Remove an index and all its data
curl -X DELETE http://localhost:9200/<index>
more elasticsearch
all 19 commands →
Get index settings
curl -s http://localhost:9200/<index>/_settings | jq .
Reindex
curl -X POST http://localhost:9200/_reindex -H 'Content-Type: application/json' -d '{"source":{"index":"old"},"dest":{"index":"new"}}'
Force merge index
curl -X POST 'http://localhost:9200/<index>/_forcemerge?max_num_segments=1'
Node stats
curl -s http://localhost:9200/_cat/nodes?v
Search query
curl -s -X POST http://localhost:9200/<index>/_search -H 'Content-Type: application/json' -d '{"query":{"match":{"message":"error"}}}'