elasticsearch 根据索引别名获取所有索引名称

ImmutableOpenMap> map = esClient.admin().indices().prepareGetAliases(ALIAS_NAME).get().getAliases();

final Set allIndices = new HashSet<>();
map.keysIt().forEachRemaining(allIndices::add);
return allIndices;

 

你可能感兴趣的:(elasticsearch)