pri elasticsearch code example
Example 1: elasticsearch list indexes
GET /_cat/indices/twi*?v&s=index
Example 2: java program to get all cat indices in elasticsearch javadoc
GetIndexRequest request = new GetIndexRequest().indices("*");
GetIndexResponse response = client.indices().get(request, RequestOptions.DEFAULT);
String[] indices = response.getIndices();