Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Bug Fix, Clean all the indices, included hidden indices #758

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOE
}

protected static void wipeAllODFEIndices() throws IOException {
Response response = client().performRequest(new Request("GET", "/_cat/indices?format=json"));
// include all the indices, included hidden indices.
// https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html#cat-indices-api-query-params
Response response = client().performRequest(new Request("GET", "/_cat/indices?format=json&expand_wildcards=all"));
JSONArray jsonArray = new JSONArray(EntityUtils.toString(response.getEntity(), "UTF-8"));
for (Object object : jsonArray) {
JSONObject jsonObject = (JSONObject) object;
Expand Down