Skip to content

Commit

Permalink
Support wildcard/regex for indices param in _remotestore/_restore
Browse files Browse the repository at this point in the history
Signed-off-by: bansvaru <[email protected]>
  • Loading branch information
linuxpi committed Jul 27, 2023
1 parent c25c175 commit 85c230d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,12 @@ public ClusterState execute(ClusterState currentState) {

List<String> indicesToBeRestored = new ArrayList<>();
int totalShards = 0;
for (String index : request.indices()) {
List<String> filteredIndices = filterIndices(
new ArrayList<>(currentState.metadata().indices().keySet()),
request.indices(),
IndicesOptions.LENIENT_EXPAND_OPEN_HIDDEN
);
for (String index : filteredIndices) {
IndexMetadata currentIndexMetadata = currentState.metadata().index(index);
if (currentIndexMetadata == null) {
// ToDo: Handle index metadata does not exist case. (GitHub #3457)
Expand Down

0 comments on commit 85c230d

Please sign in to comment.