【问题标题】:How to retrieve all existing indeces in painless如何轻松检索所有现有索引
【发布时间】:2020-03-11 15:07:18
【问题描述】:

我想从聚合的脚本字段中检索我的 ES 集群中的索引数量。

我知道您可以使用 ctx._source 访问一些上下文值,但有人知道如何从我的集群中获取索引总数吗?

谢谢!

【问题讨论】:

    标签: elasticsearch elasticsearch-painless


    【解决方案1】:

    这是不可能的。 ctx 上下文不知道集群的状态。它只能访问当前迭代的文档。

    【讨论】:

      猜你喜欢
      • 2016-06-13
      • 2012-08-12
      • 1970-01-01
      • 2010-09-29
      • 1970-01-01
      • 2011-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多