Ankit_Jain
(Ankit Jain)
September 3, 2013, 4:07pm
1
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 .
Ivan
(Ivan Brusic)
September 3, 2013, 6:28pm
2
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 .