Get list of indices attached to given indices

Hi All,

I would require to get the list of indices attached corresponding to given
alias. Please suggest Java API for the same.

Regards,
Ankit Jain

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You can get a list of all indices from the ClusterState. From there, you
can retrieve the indices for a given alias.

ImmutableMap<String, ImmutableMap<String, AliasMetaData>> aliases =
client.admin().cluster().state(new
ClusterStateRequest()).actionGet().getState().getMetaData().aliases();

ImmutableMap<String, AliasMetaData> alias = aliases.get(aliasName);

Cheers,

Ivan

On Tue, Sep 3, 2013 at 9:07 AM, Ankit Jain ankitjaincs06@gmail.com wrote:

Hi All,

I would require to get the list of indices attached corresponding to given
alias. Please suggest Java API for the same.

Regards,
Ankit Jain

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.