SOLR-5392: Add conf set name to solrj collection create methods

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1537941 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-11-01 14:14:07 +00:00
parent 0a34191023
commit 4f5426ae94
2 changed files with 6 additions and 4 deletions

View File

@ -260,7 +260,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa
} }
response = CollectionAdminRequest.createCollection("solrj_implicit", response = CollectionAdminRequest.createCollection("solrj_implicit",
"shardA,shardB", server); "shardA,shardB", "conf1", server);
assertEquals(0, response.getStatus()); assertEquals(0, response.getStatus());
assertTrue(response.isSuccess()); assertTrue(response.isSuccess());
coresStatus = response.getCollectionCoresStatus(); coresStatus = response.getCollectionCoresStatus();
@ -285,7 +285,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa
nodesStatus = response.getCollectionNodesStatus(); nodesStatus = response.getCollectionNodesStatus();
assertEquals(2, nodesStatus.size()); assertEquals(2, nodesStatus.size());
response = CollectionAdminRequest.createCollection("conf1", 4, server); response = CollectionAdminRequest.createCollection("conf1", 4, "conf1", server);
assertEquals(0, response.getStatus()); assertEquals(0, response.getStatus());
assertTrue(response.isSuccess()); assertTrue(response.isSuccess());

View File

@ -297,13 +297,14 @@ public class CollectionAdminRequest extends SolrRequest
return req.process( server ); return req.process( server );
} }
public static CollectionAdminResponse createCollection( String name, public static CollectionAdminResponse createCollection( String name,
Integer shards, Integer shards, String conf,
SolrServer server ) throws SolrServerException, IOException SolrServer server ) throws SolrServerException, IOException
{ {
Create req = new Create(); Create req = new Create();
req.setCollectionName(name); req.setCollectionName(name);
req.setRouterName("compositeId"); req.setRouterName("compositeId");
req.setNumShards(shards); req.setNumShards(shards);
req.setConfigName(conf);
return req.process( server ); return req.process( server );
} }
@ -327,13 +328,14 @@ public class CollectionAdminRequest extends SolrRequest
return req.process( server ); return req.process( server );
} }
public static CollectionAdminResponse createCollection( String name, public static CollectionAdminResponse createCollection( String name,
String shards, String shards, String conf,
SolrServer server ) throws SolrServerException, IOException SolrServer server ) throws SolrServerException, IOException
{ {
Create req = new Create(); Create req = new Create();
req.setCollectionName(name); req.setCollectionName(name);
req.setRouterName("implicit"); req.setRouterName("implicit");
req.setShards(shards); req.setShards(shards);
req.setConfigName(conf);
return req.process( server ); return req.process( server );
} }