public static void createCollection(Set<String> solrHosts,String collectionName,String configName,int numShards,int replicationFactor,int numShardsPerNode,String solrcoreHttpPath) throws Exception {
  logger.info("createCollection this is the collection " + collectionName + "  and this is the replicationFactor: "+ replicationFactor);
  String command=String.format("http://%s:%s/solr/admin/collections?wt=json&action=CREATE&name=%s&numShards=%d&replicationFactor=%d&collection.configName=%s&maxShardsPerNode=%d",solrHosts.toArray()[0],DEFAULT_SOLR_PORT,collectionName,numShards,replicationFactor,configName,numShardsPerNode);
  if (!StringUtils.isBlank(solrcoreHttpPath)) {
    command+="&collection.solrcoreproperties=" + solrcoreHttpPath;
  }
  logger.info("createCollection this is the collection " + collectionName + "  and this is the command: "+ command);
  String result=SolrInteractionUtils.executeSolrCommand(command);
  logger.info(result);
}

public static void createCollection ( Set < String > solrHosts , String collectionName , String configName , int numShards , int replicationFactor , int numShardsPerNode , String solrcoreHttpPath ) throws Exception { logger . info ( "createCollection this is the collection " + collectionName + "  and this is the replicationFactor: " + replicationFactor ) ; String command = String . format ( "http://%s:%s/solr/admin/collections?wt=json&action=CREATE&name=%s&numShards=%d&replicationFactor=%d&collection.configName=%s&maxShardsPerNode=%d" , solrHosts . toArray ( ) [ 0 ] , DEFAULT_SOLR_PORT , collectionName , numShards , replicationFactor , configName , numShardsPerNode ) ; if ( ! StringUtils . isBlank ( solrcoreHttpPath ) ) { command += "&collection.solrcoreproperties=" + solrcoreHttpPath ; } logger . info ( "createCollection this is the collection " + collectionName + "  and this is the command: " + command ) ; String result = SolrInteractionUtils . executeSolrCommand ( command ) ; logger . info ( result ) ; }
create a solr collection with extra solrcore . properties path if the solrcorehttppath is given then we will create the collection use a customized parameter collection . dynamicproperties to create the collection with that file
