码迷,mamicode.com
首页 > 其他好文 > 详细

Elasticseearch基本查询语句

时间:2020-06-22 14:34:46      阅读:60      评论:0      收藏:0      [点我收藏+]

标签:ret   last   http   占用内存大小   iba   templates   占用   内存   ash   

 

//查看_cat支持的信息
kibana: GET /_cat
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat‘
//查看主节点信息
kibana: GET /_cat/master?v
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/master?v‘
//查看集群所有节点
kibana: GET /_cat/nodes?v
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/nodes?v‘
//查看所有索引信息
kibana: GET /_cat/indices?v
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/indices?v‘
//查看单个索引信息
kibana: GET /_cat/indices/movies?v
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/indices/movies?v‘
//查看所有分片信息
kibana: GET /_cat/shards?v
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/shards?v‘
//查看单个索引分片信息
kibana: GET /_cat/shards/movies?v
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/shards/movies?v‘
//查看集群健康状态
kibana: GET /_cat/health?v
kibana: GET _cluster/health
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/health?v‘
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cluster/health?pretty‘
//查看插件
kibana: GET /_cat/plugins?v
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/plugins?v‘
//查看所有索引文档总数
kibana: GET _all/_count
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_all/_count?pretty‘
//查看指定索引文档总数
kibana: GET movies/_count
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/movies/_count?pretty‘
//查看所有模板
kibana: GET _cat/templates
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/templates?v‘
//查看状态为绿的索引
kibana: GET /_cat/indices?v&health=green
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/indices?v&health=green‘
//查看movies索引元数据
kibana: GET moviesbash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/movies?pretty‘
//按照文档数量排序索引
kibana: GET _cat/indices?v&s=docs.count:desc
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/indices?v&s=docs.count:desc‘
//查看各个索引占用内存大小并进行排序
kibana:
bash: curl -XGET -u elastic:password ‘http://192.168.31.215:9201/_cat/indices?v&h=i,tm&s=tm:desc‘


Elasticseearch基本查询语句

标签:ret   last   http   占用内存大小   iba   templates   占用   内存   ash   

原文地址:https://www.cnblogs.com/tudachui/p/13176456.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!