zoukankan      html  css  js  c++  java
  • ES 部分API

    查看集群的健康状态
    curl -XGET http://192.168.1.93:9200/_cat/health?v
    
    查询所有的节点
    curl -XGET http://192.168.1.93:9200/_cat/nodes?v
    
    查询所有的索引
    curl -XGET http://192.168.1.93:9200/_cat/indices?v
    
    统计es索引信息下的文档数量
    curl -XGET 'http://192.168.1.93:9200/_cat/count'

    统计某个索引信息下的文档数量
    curl -XGET 'http://192.168.1.93:9200/_cat/count/api-core-2015.12.31'
    
    查看某一类索引
    curl -XGET 'http://192.168.1.93:9200/_cat/indices/api-core-*?pretty'
    
    查看某个索引的健康状态
    curl -s http://192.168.1.93:9200/_cat/indices/IndexName?h=status
    
    查看所有关闭的索引
    curl -XGET http://192.168.1.93:9200/_cat/indices | awk '$1=="close"'
    
    
    
    打开某个关闭的索引
    curl -X POST "192.168.1.93:9200/api-core-2019.08.16/_open?pretty"
    
    删除某个索引
    curl -XDELETE 'http://192.168.1.93:9200/api-core-2019.08.11'
    
    删除某类索引
    curl -XDELETE 'http://192.168.1.93:9200/api-core-*'
    查看某个索引的健康状态

    查看所有关闭的索引

    打开某个关闭的索引

    查看某一类索引

    查看集群的健康状态

    每个命令都支持使用?v参数,来显示详细的信息

    /_cat/allocation
    /_cat/shards
    /_cat/shards/{index}
    /_cat/master
    /_cat/nodes
    /_cat/indices
    /_cat/indices/{index}
    /_cat/segments
    /_cat/segments/{index}
    /_cat/count
    /_cat/count/{index}
    /_cat/recovery
    /_cat/recovery/{index}
    /_cat/health
    /_cat/pending_tasks
    /_cat/aliases
    /_cat/aliases/{alias}
    /_cat/thread_pool
    /_cat/plugins
    /_cat/fielddata
    /_cat/fielddata/{fields}
    /_cat/nodeattrs
    /_cat/repositories
    /_cat/snapshots/{repository}
  • 相关阅读:
    复制功能的实现
    SDWebImage从缓存中获取图片
    修改屏幕亮度
    使用系统的CoreLocation定位
    button设置边宽和圆角
    在日期选择轮中选择的时间转换成年龄
    字符串与数组互转
    使用ASI传递post表单..参数是数组
    点击头像单独把图片拉取出来.然后再次点击回到初始效果
    Xcode svn import项目 上传.a文件(静态库)
  • 原文地址:https://www.cnblogs.com/llq1214/p/11319826.html
Copyright © 2011-2022 走看看