Check out example codes for "java program to get all cat indices in elasticsearch javadoc". It will help you in understanding the concepts better.

Code Example 1

GetIndexRequest request = new GetIndexRequest().indices("*");
GetIndexResponse response = client.indices().get(request, RequestOptions.DEFAULT);
String[] indices = response.getIndices();

Learn ReactJs, React Native from akashmittal.com