docs: public boolean replace(final TransportRequest request, boolean retainMode, String... replacements) {
          return getOrReplaceAllIndices(request, new IndicesProvider() {
  
              @Override
              public String[] provide(String[] original, Object request, boolean supportsReplace) {
                  if(supportsReplace) {
  
                      if(retainMode && !isAllWithNoRemote(original)) {
                          final Resolved resolved = resolveRequest(request);
                          final List<String> retained = WildcardMatcher.getMatchAny(resolved.getAllIndices(), replacements);
                          retained.addAll(resolved.getRemoteIndices());
                          return retained.toArray(new String[0]);
                      }
                      return replacements;
                  } else {
                      return NOOP;
                  }
              }
          }, false);
      }