🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

milvus-logo
LFAI
< Docs
  • Go

DropCollection()

This method drops the specified collection and the entities within.

Invocation

client.DropCollection(ctx, collName)

Parameters

ParameterDescriptionType
ctxContext to control API invocation processcontext.Context
collNameName of the collection to dropString

Return

No return.

Errors

err: error in the dropping process (if any), possible errors are listed below:

  • ErrClientNotReady, error that the client is not connected.

  • ErrCollectionNotExists, error that the collection with the specified name does not exist.

  • error that API invocation failed.

Example

err = milvusClient.DropCollection(
  context.Background(),
  "book",
)
if err != nil {
    log.Fatal("fail to drop collection:", err.Error())
}

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?