mirror of https://github.com/apache/lucene.git
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:
parent
0a34191023
commit
4f5426ae94
|
@ -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());
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue