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 Aug 1, 2023
1 parent 91bc891 commit 0a5e37a
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(
List.of(currentState.metadata().getConcreteAllIndices()),
request.indices(),
IndicesOptions.fromOptions(true, true, true, true)
);
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 0a5e37a

Please sign in to comment.