https://www.elastic.co/guide/cn/elasticsearch/guide/current/partial-updates.html
update 请求最简单的一种形式是接收文档的一部分作为 doc 的参数, 它只是与现有的文档进行合并。对象被合并到一起,覆盖现有的字段,增加新的字段。

POST /website/blog/1/
{
  "title": "My first blog entry",
  "text":  "Just trying this out..."
}

例如,我们增加字段 tags 和 views 到我们的博客文章,如下所示:

POST /website/blog/1/_update
{
   "doc" : {
      "tags" : [ "testing" ],
      "views": 0
   }
}

 

相关文章:

  • 2021-10-21
  • 2022-02-07
  • 2021-10-04
  • 2021-12-23
  • 2022-12-23
  • 2021-07-01
猜你喜欢
  • 2021-12-07
  • 2021-11-20
  • 2022-01-11
  • 2021-11-27
  • 2021-06-22
  • 2021-07-22
相关资源
相似解决方案