ES集群状态、节点、索引等查看及根据字段、排序查询
生活随笔
收集整理的這篇文章主要介紹了
ES集群状态、节点、索引等查看及根据字段、排序查询
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
ES集群基礎:
1. 查看集群:
http://172.xxx.xxx.8:9200
2. 查看狀態:
http://172.xxx.xxx.8:9200/_cat/health?v
3. 查看索引:
http://172.xxx.xxx.8:9200/_cat/indices?v
4. 查看節點:
http://172.xxx.xxx.8:9200/_cat/nodes?v
5. 查看磁盤空間:
http://172.xxx.xxx.8:9200/_cat/allocation?v
6. 查看節點的分配情況:
http://172.xxx.xxx.8:9200/_cat/shards
7. 找到某個節點id:
http://172.xxx.xxx.8:9200/_nodes/process
8. 查看索引結構:
http://172.xxx.xxx.8:9200/idx_tile
9. 查詢索引數據:
http://172.xxx.xxx.8:9200/idx_point/_search
10. 查詢所有數據,根據某個字段降序排序 post查詢,body的參數如下
http://172.xxx.xxx.8:9200/idx_point/_search
{"query": {"match_all": {}},"sort": [{"seq": {"order": "desc"}}]
}
11. 根據某個字段查詢
http://172.xxx.xxx.8:9200/idx_point/_search
{"query":{"match_phrase":{"pid":"H2019001"}}
}
12. 根據某個字段查詢結果,刪除
http://172.xxx.xxx.8:9200/idx_point/_delete_by_query
{"query":{"match_phrase":{"pid":"H201900001"}}
}
13. 根據某個字段查詢并只返回某一個字段
http://172.xxx.xxx.8:9200/idx_point/_search
{"query":{"match":{"pid":"1111124345511"}},"_source":"timestamp"
}
14. 修改settings某個字段
在kibana console中先查詢,在更新
GET idx_cx_test/_settings
{"query":{"match_all":{}}
}
PUT idx_cx_test/_settings
{"max_result_window": 100000
}
15. Kibana console查詢集群狀態、節點、索引等
GET _cat/health?v
{"query":{"match_all":{}}
}
GET _cat/nodes?v
{"query":{"match_all":{}}
}
GET _cat/indices?v
{"query":{"match_all":{}}
}
16. Kibana console導出為curl請求
總結
以上是生活随笔為你收集整理的ES集群状态、节点、索引等查看及根据字段、排序查询的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 点、线、面生成mvt(MapBox Ve
- 下一篇: 结婚能缓解痛经,那痛经的妹子们在忍无可忍