gpt4 book ai didi

elasticsearch - 如何查看 ElasticSearch 的 Reindex API 的进度

转载 作者:行者123 更新时间:2023-12-04 12:31:42 29 4
gpt4 key购买 nike

我正在尝试通过 从远程 ES 2.4 集群执行重新索引操作重新索引 API .哪个工作是将超过 1 亿个索引文档传输到最新版本的 elasticsearch。
对于测试用例,我正在小数据集上尝试,但我面临以下问题。
问题:

  • 我看不到有多少文档的脚本进度
    已转移,还剩多少。
  • 如果失败,我如何恢复脚本而不是
    从0重新开始。
  • 最佳答案

    您可以使用 Task management API了解reindex的状态, 正如 official doc of reindex API 中所建议的.来自同一个文档

    If the request contains wait_for_completion=false, Elasticsearchperforms some preflight checks, launches the request, and returns atask you can use to cancel or get the status of the task.Elasticsearch creates a record of this task as a document at.tasks/_doc/${taskId}. When you are done with a task, you shoulddelete the task document so Elasticsearch can reclaim the space.

    关于elasticsearch - 如何查看 ElasticSearch 的 Reindex API 的进度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65036535/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com