-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
By using elasticsearch client java api 6.0 ,I am trying to get only those indices which are associated with an specific alias in elsticsearch 6.0.
My Requirement: if index A and index D are associated with alias "aliasTemp". and index B is associated with alias "aliasB" then if i want to search by alias "aliasTemp" then only indices A and D should be return. I am using below snippet with elastic search 6.0 client library.
GetAliasesResponse r = client.admin().indices().getAliases(new GetAliasesRequest("aliasTemp")).actionGet();
ImmutableOpenMap<String, List<AliasMetaData>> indexMap = r.getAliases();
indexMap contains index as key and values will be alias, My expectation is this indexMap would only have those indices as key which are actually associated with specific alias ("aliasTemp"). in this case index should be index A and index D only.
By searching with alias"aliasTemp" I am getting all the indices(i.e Index A, index B ,index D)as key in indexMap. But values are only present for index A and index D . Index B map value have empty list .
In elasticsearch 5.3.1 client api, above code works perfectly ,but with In elasticsearch 6.0.0 , these map contains all the indices as key.It should not contains all indices.