// 查看集群状态
GET /_cluster/health?pretty
// 查看所有索引配置信息
Get _all/_settings
// 查看所有索引状态
GET /_cat/indices?v
// 查看指定索引状态
GET /_cluster/health/bill?pretty
// 查看索引信息
GET /bill
// 查看结节状态信息
GET _nodes/stats
// 查看所有索引分片信息
GET /_cat/shards?v
// 查看指定索引分片信息
GET /_cat/shards/bill?v
// 查看mapping
GET /bill/ebill/_mapping?pretty
// 新建索引
PUT /weather
// 删除索引
DELETE /weather
// 创建索引映射
PUT /accounts
{
"mappings": {
"person": {
"properties": {
"user": {
"type": "text"
},
"title": {
"type": "text"
},
"desc": {
"type": "text"
}
}
}
}
}
// 插入记录(文档,可以不指定ID 1) 更新也这条
PUT /accounts/person/1
{
"user": "张三",
"title": "工程师",
"desc": "数据库管理"
}
// 查看文档
GET /accounts/person/1?pretty=true
// 删除文档
DELETE /accounts/person/1