Skip to main content

ReleaseCollection()

This method releases the specified collection from memory.

func (c *GrpcClient) ReleaseCollection(ctx context.Context, collName string) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

collName

Name of the collection to release.

string

Return

Null

Errors

Any error in the execution of the request. Possible errors are as follows:

  • ErrClientNotReady: The client is not connected to Milvus.

  • ErrCollectionNotExists: The collection with the specified name does not exist.

  • The call to this API fails.

Example

// release collection
errRelease := mc.ReleaseCollection(context.Background(), collectionName)
if errRelease != nil {
log.Fatal("failed to release collection:", errRelease.Error())
}