milvus-logo
LFAI
< Docs
  • Go

ReleaseCollection()

This method releases the specified collection from memory.

Invocation

client.ReleaseCollection(ctx, collName)

Parameters

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

Constraints

  • Releasing the collection that is successfully loaded is allowed.
  • Releasing the collection is allowed when its partition(s) are loaded.
  • Error will be returned at the attempt to release partition(s) when the parent collection is already loaded. Future releases will support releasing partitions from a loaded collection, and loading the collection when its partition(s) are released.

Return

No return.

Errors

err: error in the 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.ReleaseCollection(
  context.Background(),
  "book",
)
if err != nil {
  log.Fatal("failed to release 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?