I am trying to fetch the list of index names matching an index prefix (for example: abc-2024-02*)
GetIndexRequest request = new GetIndexRequest.Builder().index("abc-2024-02*").allowNoIndices(false).expandWildcards(ExpandWildcard.Open).build();
try {
GetIndexResponse response = client.indices().get(request);
}
catch(Exception ex){}
GetIndexResponse response does not have any helper to get the indices names. Instead we get the index names , settings and all other details in a JSON.
But the Elasticsearch rest high level client (this client is deprecated) had a method "response.getIndices()" to fetch the index names.
Are there any other efficient method to get the list of index names matching a prefix pattern other than parsing the response JSON ?