github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/docs/create_partition.md (about) 1 # Create Partition 2 3 API to create a partition in a specified collection. 4 5 ## Parameters 6 7 | Parameter | Description | Type | 8 | ------------ | ------------------------------------------------------------- | ------------------------ | 9 | `ctx` | Context to control API invocation process. | context.Context | 10 | `collName` | Name of the collection to create a partition in. | String | 11 | `partitionName` | Name of the partition to create. | String | 12 13 14 15 ## Response 16 17 `err`: error in the process (if any). Possible errors are listed below: 18 19 - `ErrClientNotReady`, error that the client is not connected. 20 21 - `ErrCollectionNotExists`, error that the collection with the specified name does not exist. 22 23 - error that partition with the same name already exists. 24 25 - error that API invocation failed. 26 27 ## Example 28 29 ```go 30 ctx := context.Background() 31 // cli is a valid Client instance 32 err := cli.CreatePartition(ctx, "TestCollection", "Partition1") 33 // handles the error not nil 34 ```