public static void createAlias(String host,String alias,String collection) throws IOException {
  String createAliasTemplate="http://%s:%s/solr/admin/collections?action=CREATEALIAS&name=%s&collections=%s";
  String createAliasCommand=String.format(createAliasTemplate,host,DEFAULT_SOLR_PORT,alias,collection);
  String result=executeSolrCommand(createAliasCommand);
  logger.info(result);
}

public static void createAlias ( String host , String alias , String collection ) throws IOException { String createAliasTemplate = "http://%s:%s/solr/admin/collections?action=CREATEALIAS&name=%s&collections=%s" ; String createAliasCommand = String . format ( createAliasTemplate , host , DEFAULT_SOLR_PORT , alias , collection ) ; String result = executeSolrCommand ( createAliasCommand ) ; logger . info ( result ) ; }
create an alias for a given collection
