Client client=new ESClient().getClient();
ClusterStateRequest clusterStateRequest = Requests.clusterStateRequest()
.filterRoutingTable(true)
.filterNodes(true)
.filteredIndices(indexNames);
MetaData md=client.admin().cluster().state(clusterStateRequest)
.actionGet(30000).getState().metaData();
for(IndexMetaData imd : md)
for(AliasMetaData amd : imd.aliases().values())
alias.put(imd.index(), amd.alias());