es常用命令

1 查看所有索引

GET /_cat/indices?v

2 集群状态监控

GET _cluster/health

3 集群某索引的详细统计信息

GET /index-name/_stats

4 查看索引的分片在不同结点之间的分布

GET _cat/shards/索引名

5 索引的统计信息

GET _all/_stats

6 查看索引mapping

GET /index-name/_mapping?pretty

7 给索引mapping添加字段

POST /index-name/_mapping/doc?pretty
{
    "properties": {
        "field-name":{
            "type":"float" 
        } 
    } 
}

8 关闭索引

POST /index-name/_close

9 打开索引

POST /index-name/_open

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *