index操作
创建index
PUT
http://ip:port/{index}
获取指定index
GET
http://ip:port/{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}
{
“id”:1,
“name”:“test”
}
查询指定doc
GET
http://ip:port/{index}/_doc/{id}
修改doc部分属性
POST
http://ip:port/{index}/_update/{id}
{
“doc”:{
“name”:“update”
}
}
删除doc
DELETE
http://ip:port/{index}/_doc/{id}
搜索doc
GET
http://ip:port/{index}/_search
{
“query”: {
“match_all”: {}
}
}
mapping
设置index mapping
PUT
http://ip:port/{index}/_mapping
{
“properties”:{
“id”:{
“type”: “long”
},
“name”:{
“type”: “text”
}
}
}