zoukankan      html  css  js  c++  java
  • 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'


  • 相关阅读:
    java DMO及增删改查代码的自动生成
    如果有一天苹果免费了,支付宝怎么办
    jquery实现页面交互的几个小例子
    android中的所谓观察者模式
    随笔——runnable勘误以及其他
    android 源码角度全方位理解filter
    android 你的onfocuschangelistener和android:state_hovered为何不起作用
    android 如何阻断seekbar的触摸事件
    java 传值和传引用
    Android内存优化(使用SparseArray和ArrayMap代替HashMap)
  • 原文地址:https://www.cnblogs.com/tudachui/p/13176456.html
Copyright © 2011-2022 走看看