createPartition()
This operation creates a partition in the target collection.
public void createPartition(CreatePartitionReq request)
Request Syntax
createPartition(CreatePartitionReq.builder()
.collectionName(String collectionName)
.partitionName(String partitionName)
.build()
)
BUILDER METHODS:
collectionName(String collectionName)
(Required) The name of an existing collection.
partitionName(String partitionName)
(Required) The name of the partition to create.
RETURNS:
void
EXCEPTIONS:
MilvusClientExceptions
This exception will be raised when any error occurs during this operation.
Example
// create a partition "test_partition" in collection "test"
CreatePartitionReq createPartitionReq = CreatePartitionReq.builder()
.collectionName("test")
.partitionName("test_partition")
.build();
client.createPartition(createPartitionReq);