elasticsearch - List all available indices via Java API -
How to get a list of all the available indices through the Java API?
With REST, this is just the following HTTP-R to: http: //www.XXX.XXX:9200/_aliases
But for stability, it would be good to do this via Java API.
The equivalent of using the Java API and Flexible code org.elasticsearch .client.Client
class is:
client.admin (). Cluster () .prepareState () Execute () .actionGet () GetState () .getMetaData () .aliases ();
Comments
Post a Comment