This method creates a partition with the specified name.
create_partition(partition_name, description="")
Parameter | Description | Type | Required |
---|---|---|---|
partition_name | Name of the partition to create | String | True |
description | Description of the partition to create | String | False |
The newly created partition object.
CollectionNotExistException
: error if the collection does not exist.BaseException
: error if the specified partition does not exist.from pymilvus import Collection
collection = Collection("book") # Get an existing collection.
collection.create_partition("novel")