elasticsearch常用命令
index操作
创建index
获取指定index
获取所有的index
GET
http://ip:port/_cat/indices?v
删除指定index
DELETE
http://ip:port/{index}
doc操作
创建doc、全量修改doc
POST或PUT
http://ip:port/{index}/_doc/{id}
1 |
|
查询指定doc
GET
http://ip:port/{index}/_doc/{id}
修改doc部分属性
POST
http://ip:port/{index}/_update/{id}
1 |
|
删除doc
DELETE
http://ip:port/{index}/_doc/{id}
搜索doc
GET
http://ip:port/{index}/_search
1 |
|
mapping
设置index mapping
PUT
http://ip:port/{index}/_mapping
1 |
|