code: @Deprecated
      public static void createAlias(Client client, String alias, String index) throws Exception {
          logger.trace("createAlias({},{})", alias, index);
          AcknowledgedResponse response = client.admin().indices().prepareAliases().addAlias(index, alias).get();
          if (!response.isAcknowledged()) throw new Exception("Could not define alias [" + alias + "] for index [" + index + "].");
          logger.trace("/createAlias({},{})", alias, index);
      }
docs: Create an alias if needed
  @param client Client to use
  @param alias Alias name
  @param index Index name
  @throws Exception When alias can not be set