milvus-logo
LFAI
< Docs
  • Go

DropPartition()

This method drops the specified partition and the entities within.

Invocation

client.DropPartition(ctx, collName, partName)

Parameters

ParameterDescriptionType
ctxContext to control API invocation processcontext.Context
collNameName of the collection to drop partition fromString
partNameName of the partition to dropString

Return

No return.

Errors

err: error in the process (if any). Possible errors are listed below:

  • ErrClientNotReady, error stands for the client is not connected

  • ErrCollectionNotExists, error stands for collection of the specified name does not exist

  • error that API invocation failed.

Example

err := milvusClient.DropPartition(
  context.Background(),
  "book",
  "novel",
)
if err != nil {
  log.Fatal("fail to drop partition:", err.Error())
}
Feedback

Was this page helpful?