Bug ES6 JAVA API: Elasticsearch returning all the indices while trying to get only those indices which are associated with specific alias


(Antitech) #1

I have recently upgraded application from Elastic search 5.3.1 to 6.0.

My requirement was to get all the indices which were associated with specific alias.

I used below mentioned snippet to fetch all indices associated with specific alias . This snippet is working fine in 5.3.1 and giving only those indices which are associated with that specific alias.

GetAliasesResponse r = client.admin().indices().getAliases(new GetAliasesRequest("givenalias")).actionGet();

But after ES 6.0 , the same snippet giving all the indices which are created in system .

Ideally it should only return those indices which are associated with given alias .Not others. This was working in Elastic search 5.3.1.


(Antitech) #2

@dadoonet can u help me with this query. I have to search all the indices by specific aliasname.

GET /alias1/_alias this is working fine on ES6.0.0 by java api that i mentioned is not giving the same.


(David Pilato) #3

Read this and specifically the "Also be patient" part.


(Antitech) #4

Thanks @dadoonet.

@jasontedor

https://github.com/elastic/elasticsearch/commit/5b2ab96364335539affe99151546552423700f6e can be a cause.


(Jason Tedor) #5

Personally I think this is a bug, it is certainly an unintended breaking change. I opened #27763 for discussion.


(Antitech) #6

Thanks @jasontedor . I 'll be watcher there.


(system) closed #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.