背景:
我尝试为6.8使用reindex API,如ES文件中所述
POST <https://endpoint of destination Elasticsearch>/_reindex
{
"source": {
"remote": {
"host": "https://endpoint-of-source-elasticsearch-cluster-1.es.amazonaws.com"
},
"index": "source-index-name"
},
"dest": {
"index": "destination-index-name"
}
}问题:
我的错误越来越少
{
"error": {
"root_cause": [
{
"type": "x_content_parse_exception",
"reason": "[8:3] [reindex] failed to parse field [source]"
}
],
"type": "x_content_parse_exception",
"reason": "[8:3] [reindex] failed to parse field [source]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "[host] must be of the form [scheme]://[host]:[port](/[pathPrefix])? but was [https://endpoint-of-source-elasticsearch-cluster-1.es.amazonaws.com]",
"caused_by": {
"type": "u_r_i_syntax_exception",
"reason": "The port was not defined in the [host]: https://endpoint-of-source-elasticsearch-cluster-1.es.amazonaws.com"
}
}
},
"status": 400
}可能的原因:
由于我使用的是AWS集群,所以我不知道如何遵循主机、post或如何白名单集群的方案,因为我不知道如何在AWS集群上进行这些更改。
请求帮助,如果有任何解决办法。谢谢,
发布于 2020-05-05 09:33:06
发布于 2020-11-28 20:08:51
AWS Elasticsearch v7.9现在支持远程重新索引,只需发出一个reindex命令,例如:
POST <local-domain-endpoint>/_reindex
{
"source": {
"remote": {
"host": "https://remote-domain-endpoint:443"
},
"index": "remote_index"
},
"dest": {
"index": "local_index"
}
}必须在远程域终结点添加443以进行验证检查。
若要验证索引是否已复制到本地域,请执行以下操作:
GET <local-domain-endpoint>/local_index/_search如果远程索引位于与本地域不同的区域,则传递其区域名称,如在此示例请求中:
POST <local-domain-endpoint>/_reindex
{
"source": {
"remote": {
"host": "https://remote-domain-endpoint:443",
"region": "eu-west-1"
},
"index": "test_index"
},
"dest": {
"index": "local_index"
}
}注意: 1-必须将端口包括在源地址中。
2-使用AWS Elasticsearch,您不再需要像使用标准Elasticsearch那样白名单源IP/地址,AWS Elasticsearch假设通过发出此命令源地址是可信的。
Elasticsearch文档可参考:https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/remote-reindex.html
发布于 2020-12-09 13:55:21
从没有尝试过在aws es中使用远程重新索引功能,它只是不起作用。
善良的老弹性转储永远不会失败:
elasticdump \
--input=https://xxxx.eu-west-1.es.amazonaws.com:443/index-name \
--output=https://xxxx.eu-west-1.es.amazonaws.com:443/index-name \
--type=data \
--limit=500 \
--concurrency=5在没有sudo的情况下安装:
# Install node without root
curl -s https://webinstall.dev/node | bash
# Install elasticdump
npm install elasticdump -ghttps://stackoverflow.com/questions/61467810
复制相似问题