【发布时间】:2016-09-09 16:12:27
【问题描述】:
我在弹性搜索中有一个索引列表如下:
index1, index2, index3, test-index1, test-index2, test-index3
现在我只想要那些与我的模式“test-*”匹配的索引。
我可以通过以下语义查询来达到上述结果:
GET test-*/_aliases
我想从 java 代码中获得相同的结果。
【问题讨论】:
标签: java list elasticsearch
我在弹性搜索中有一个索引列表如下:
index1, index2, index3, test-index1, test-index2, test-index3
现在我只想要那些与我的模式“test-*”匹配的索引。
我可以通过以下语义查询来达到上述结果:
GET test-*/_aliases
我想从 java 代码中获得相同的结果。
【问题讨论】:
标签: java list elasticsearch
响应/test-*/_aliases 的 REST 端点执行以下操作 (see here):
GetAliasesResponse getAliasesResponse = client().admin().indices()
.prepareGetAliases()
.setIndices("test-*", "index-*").get();
【讨论】: