GET /blog/article/_search
{
"query": {
"match": {
"tags": "release"
}
}
}
GET /blog/article/1/_source
POST /blog/article/1/_update
{
"script": "ctx._source.content = \"new content\""
}
本文介绍了一种更新博客文章内容的方法,通过使用REST API调用,可以实现对特定文章内容的修改。这种方法不仅适用于单一文章,也适合批量更新文章内容。
GET /blog/article/_search
{
"query": {
"match": {
"tags": "release"
}
}
}
GET /blog/article/1/_source
POST /blog/article/1/_update
{
"script": "ctx._source.content = \"new content\""
}
1145
3万+
1万+

被折叠的 条评论
为什么被折叠?