【问题标题】:Is there a way to get one, unified, mapping from all indices under one alias?有没有办法从一个别名下的所有索引中获得一个统一的映射?
【发布时间】:2020-02-07 17:33:20
【问题描述】:

例如,如果我有 10 个名称相似的索引并且它们都别名为 test-index,我将如何获得 test-index-1 test-index-2 test-index-3 test-index-4test-index-5test-index-6test-index-7test-index-8test-index-9test-index-10 都指向当前使用的映射,而您指向 GET /test-index/_mapping?

【问题讨论】:

  • 我最初误解了你的问题。您通过GET /test-index/_mapping 得到的回复到底有什么问题?

标签: javascript python elasticsearch curl elasticsearch-py


【解决方案1】:

不确定您将什么定义为“统一”映射 - 但您始终可以在映射请求中使用通配符。例如: /test-inde*/_mapping 将给出该模式中所有索引的映射。

【讨论】:

  • 这是我最初打算解决问题的方式。但是后来我意识到他说他已经为所有这些索引使用了别名test-index,并且他报告了我期望的正确获取所有映射的命令——即GET /test-index/_mapping。我的感觉是,他希望将所有映射合并到一个与别名关联的映射中,这在 AFAIK 中是不可能的
猜你喜欢
  • 1970-01-01
  • 2010-12-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多