For RestHighLevelClient :
Try using: /_cat/indices?h=i
InputStream inputStream = restHighLevelClient.getLowLevelClient() .performRequest("GET", "/_cat/indices?h=i") .getHttpResponse() .getEntity() .getContent(); List<String> indexes = new BufferedReader(new InputStreamReader(inputStream)) .lines() .collect(Collectors.toList());
Also, if you want to search using the regular expression: /_cat/indices?h=i&index=test*
source share