本文最后更新于 515 天前,其中的信息可能已经有所发展或是发生改变,纠正错误请发送邮件到<baigeixiangcai@gmail.com>。
查看ES整体状态
GET _cluster/health查看各个节点状态
GET _cat/nodes?v查看各节点硬盘情况
GET _cat/allocation?v查看所有索引
GET _cat/indices?v打开所有索引
POST _all/_open关闭所有索引
POST _all/_close查看线程状态
GET _cat/thread_pool/设置查询深度
from+size,默认大小10000
PUT _all/_settings
{
"index.max_result_window": "1000000"
}
副分片数量设置
PUT _all/_settings
{
"settings": {
"number_of_replicas": 0
}
}查看热点数据
GET /_nodes/hot_threadsGET /_nodes/<node_id>/hot_threads重新尝试分配
POST /_cluster/reroute?retry_failed=true删除查询的数据
POST index/_doc/_delete_by_query
{
"query": {
"match": {
"user.id": "elkbee"
}
}
}修改查询的数据
POST index/_doc/_update_by_query?conflicts=proceed
{
"query": {
"term": {
"user.id": "kimchy"
}
}
}所有索引强制段合并
POST /_all/_forcemerge?max_num_segments=1Last Updated on 2024 18 7 月