reindex elasticsearch如果将新元素插入到文档数组中

时间:2017-07-13 14:16:22

标签: arrays elasticsearch

我是elasticsearch的新人。我的ES中有以下类型的结构。

PUT /my_index/blogpost/1
 {
 "title": "Nest eggs",
  "body":  "Making your money work...",
  "tags":  [ "cash", "shares" ],
  "comments": [ 
  {
   "name":    "John Smith",
   "comment": "Great article",
    "age":     28,
  "stars":   4,
  "date":    "2014-09-01"
  },
  {
  "name":    "Alice White",
  "comment": "More like this please",
  "age":     31,
  "stars":   5,
  "date":    "2014-10-22"
  }
 ]
}

我发现文件是不可变的:它们不能被更改,只能被替换。所以我想知道什么时候推送或拉出任何对象"评论"那么阵列会发生什么?是my_index会重新编制索引还是1文档会重新编制索引?

0 个答案:

没有答案