• Elasticseearch基本查询语句


    //查看_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'


  • 相关阅读:
    设计模式_桥梁模式
    C++基础学习教程(一)
    Python图像处理(11):k均值
    Cygwin-安装和配置ssh服务
    LeetCode11:Container With Most Water
    事务四大特征:原子性,一致性,隔离性和持久性(ACID)
    2014微软编程之美初赛第一场第三题 活动中心
    改进xutils下载管理器,使其,在随意地方进行进度更新,以及其它状态监听操作
    IT痴汉的工作现状21-Android开发前景论
    Spring配置文件总结
  • 原文地址:https://www.cnblogs.com/tudachui/p/13176456.html
Copyright © 2020-2023  润新知