diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java index f73b118d672..695923a12e2 100644 --- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java @@ -260,7 +260,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa } response = CollectionAdminRequest.createCollection("solrj_implicit", - "shardA,shardB", server); + "shardA,shardB", "conf1", server); assertEquals(0, response.getStatus()); assertTrue(response.isSuccess()); coresStatus = response.getCollectionCoresStatus(); @@ -285,7 +285,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa nodesStatus = response.getCollectionNodesStatus(); assertEquals(2, nodesStatus.size()); - response = CollectionAdminRequest.createCollection("conf1", 4, server); + response = CollectionAdminRequest.createCollection("conf1", 4, "conf1", server); assertEquals(0, response.getStatus()); assertTrue(response.isSuccess()); diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java index 502e4af0c77..c48d73562bd 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java @@ -297,13 +297,14 @@ public class CollectionAdminRequest extends SolrRequest return req.process( server ); } public static CollectionAdminResponse createCollection( String name, - Integer shards, + Integer shards, String conf, SolrServer server ) throws SolrServerException, IOException { Create req = new Create(); req.setCollectionName(name); req.setRouterName("compositeId"); req.setNumShards(shards); + req.setConfigName(conf); return req.process( server ); } @@ -327,13 +328,14 @@ public class CollectionAdminRequest extends SolrRequest return req.process( server ); } public static CollectionAdminResponse createCollection( String name, - String shards, + String shards, String conf, SolrServer server ) throws SolrServerException, IOException { Create req = new Create(); req.setCollectionName(name); req.setRouterName("implicit"); req.setShards(shards); + req.setConfigName(conf); return req.process( server ); }