【问题标题】:How do you get the ElasticSearch `refresh_interval` for an index?您如何获得索引的 ElasticSearch `refresh_interval`?
【发布时间】:2021-08-05 22:12:57
【问题描述】:

在阅读了一些 Elasticsearch 索引调整指南(如 How to Maximize Elasticsearch Index Performance 和 elastic 的 Tune for indexing speed)后,我想看看更新 refresh_interval。

我们正在使用 AWS Elasticsearch 域(elasticsearch 版本 6.2)。 Cloudformation 的文档网站 AWS::Elasticsearch::Domain 上没有提到 refresh_interval

所以我想看看 AWS Elasticsearch 的默认设置是什么。 使用 _settings API 不会显示 refresh_interval。

GET /my_index/_settings

并且指定 refresh_interval 也不显示任何内容。

GET /my_index/_settings/index.refresh_interval

只返回一个空对象。

{}

如何找到 Elasticsearch 的当前 refresh_interval?

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    您需要添加一个名为 include_defaults 的参数,以便同时检索默认值:

    GET /my_index/_settings?include_defaults=true
    

    在响应中,您将获得一个 defaults 部分,其中包含 refresh_interval 设置的默认值,很可能是 1s

    注意:refresh_interval 为空的原因是您的索引没有明确设置值,因此您的索引使用默认值。

    【讨论】:

      猜你喜欢
      • 2020-01-17
      • 2012-12-30
      • 2015-10-21
      • 1970-01-01
      • 1970-01-01
      • 2019-03-16
      • 1970-01-01
      • 2018-07-25
      • 2021-04-03
      相关资源
      最近更新 更多