Retrieving indexes attached to alias

How can I retrieve a list of existing indexes attached to an alias
using the Java API?

I am executing a periodic bulk reindex of a legacy database. To
minimize interruption the idea is to create a new timestamp named
index, perform the bulk index, add the new index to the alias, remove
the original index from the alias and delete the original index. I
need a way to retrieve the name of the existing index as it will
always be unique.

You can use the cluster state API to get it, here is how the REST get
aliases endpot works:
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/rest/action/admin/indices/alias/RestGetIndicesAliasesAction.java#L59
.

On Fri, Jan 20, 2012 at 9:24 PM, JamesA james@oslx.com wrote:

How can I retrieve a list of existing indexes attached to an alias
using the Java API?

I am executing a periodic bulk reindex of a legacy database. To
minimize interruption the idea is to create a new timestamp named
index, perform the bulk index, add the new index to the alias, remove
the original index from the alias and delete the original index. I
need a way to retrieve the name of the existing index as it will
always be unique.