Elasticsearch Kibana&Dev tools

1.检测集群健康信息

GET /_cluster/health

2.统计文档数量

GET /_count

3.创建索引 book

PUT /book

 

 

 4.创建索引 blog ,同时指定分片与副本数量

PUT /blog
{
  "settings": {
    "number_of_shards": 5,
    "number_of_replicas": 2
  }
}

5.查询book 索引详情

GET /book/_search

6.修改 book 索引的副本数量(分片不可修改)

PUT /book/_settings
{
  "settings": {
    "number_of_replicas": 2
  }
}

8. 删除 book 索引

DELETE /book

9.book索引中插入数据

PUT /book/doc/1
{
"name": "zhangsan",
"age":12,
"address":"中国-北京",
"sex":"男",
"love":"赌博"
}

 

 

posted @ 2020-10-29 18:01  byebai95  阅读(211)  评论(0编辑  收藏  举报