Get all IndexMetadata in 5.X

I am migrating from ES 2.X to 5.X. In 2.X I am using TransportClient to get IndexMetadata for all indexes:
getClient().admin().cluster() .prepareState().execute().actionGet().getState().getMetaData().getIndices();

It looks like I can't get AdminClient from HighLevelRestClient in 5.X. I am also not even finding a way to use LowLevelRestClient to create an http request to get indexMetadata. How would I get IndexMetadata in 5.X and 6.X?

@MSem So you only need a list of all indices?

Also, anything you can do through the REST API, you can do with the low-level REST client.

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