一、 查看健康状况
GET _cat/health?v
二、 查看索引
GET _cat/indices?v
三、 插入索引
PUT /ecommerce
四、 在索引下插入文档
PUT /ecommerce/_doc/1
{
"name":"gaolujie yagao",
"desc":"youxiao fangzhu",
"price":25,
"producer":"gaolujie producer",
"tags":["meibai","fangzhu"]
}
五、获取文档
GET /ecommerce/_doc/1
六、修改文档
A、方式一 替换
PUT /ecommerce/_doc/1
{
"name":"jiaqiangban gaolujie yaogao",
"desc":"gaoxiao meibai",
"price":25,
"producer":"jiajieshi producer",
"tags":["meibai","fangzhu"]
}
B、 方式二 修改
POST /ecommerce/_update/1
{
"doc": {
"name":"changed"
}
}
原文地址:https://www.cnblogs.com/DjanFey/p/12112591.html
时间: 2024-10-22 21:41:36