【问题标题】:Update index without losing data elasticsearch更新索引不丢失数据 elasticsearch
【发布时间】:2021-09-07 03:49:52
【问题描述】:

我尝试根据需要创建新索引,根据旧索引重新索引,但没有按预期工作并且数据没有一起复制

低于旧索引:

mappings: { 
  properties: {
    donor: {
      type: "nested",
      properties: {
        id: { type: "integer" },
        dateOfBirth: { type: "date" },
        profile: {
          type: "nested",
          properties: { 
            ...
          },
        },
      },
    }, 
  }
}

低于所需索引:

mappings: { 
  properties: {
    id: { type: "integer" },
    dateOfBirth: { type: "date" },
    profile: {
      type: "nested",
      properties: { 
        ...
      },
    },
  }, 
}

【问题讨论】:

  • 您可能还需要向我们展示您运行的重新索引命令

标签: node.js elasticsearch


【解决方案1】:

当您更改对象结构时,您需要创建一个迁移程序来检索旧“文档结构”/对象中的所有文档,更改“文档结构”/对象并将它们插入新索引中。

【讨论】:

    猜你喜欢
    • 2021-02-28
    • 2021-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-09
    • 2017-03-11
    相关资源
    最近更新 更多