【问题标题】:Remote reindex API AWS ElasticSearch Null Pointer Exception远程重新索引 API AWS ElasticSearch 空指针异常
【发布时间】:2021-11-30 18:40:15
【问题描述】:

我正在尝试使用远程重新索引 api 将一个索引从具有 ES 5.3 的旧集群移动到不同的集群 ES 7.10,两者都在同一个 VPC 中

curl -X POST \https://target.com/_reindex \
-H 'content-type: application/json' \
-d '{
  "source": {
    "remote": {
      "host": "https://source.com:443"
    },
    "index": "ind1"
  },
  "dest": {
    "index": "ind1"
  }
}'

我收到了这个错误

{"error":{"root_cause":[{"type":"null_pointer_exception","reason":null}],"type":"null_pointer_exception","reason":null},"status":500}

我不能只拍摄快照并迁移,因为 7.10 不支持 5.3 索引

【问题讨论】:

    标签: elasticsearch elasticsearch-5 reindex amazon-elasticsearch


    【解决方案1】:

    重新索引需要为源索引中的所有文档启用_source。看来您禁用了 _source 并且您无法从此索引重新编制索引。 https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html

    【讨论】:

    • 能给个链接或者参考吗? “我应该如何启用_source
    • @quickshekhar 我知道你不能为索引文档启用 _source。
    • 不能,需要在第一次索引数据时启用
    猜你喜欢
    • 1970-01-01
    • 2014-02-04
    • 2022-10-22
    • 1970-01-01
    • 2017-11-25
    • 1970-01-01
    相关资源
    最近更新 更多