Reindex elasticsearch
Copy documents from one index to another
curl -X POST http://localhost:9200/_reindex -H 'Content-Type: application/json' -d '{"source":{"index":"old"},"dest":{"index":"new"}}'
more elasticsearch
all 19 commands →
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"}}}'
Snapshot create
curl -X PUT http://localhost:9200/_snapshot/<repo>/<snapshot>
ILM explain index
curl -s 'http://localhost:9200/<index>/_ilm/explain' | jq '.indices | to_entries[] | {index:.key, phase:.value.phase, action:.value.action}'