跳到主要内容
版本:v2.5.x

ReleaseCollection()

This method releases the specified collection.

Go
func (c *Client) LoadCollection(ctx context.Context, option LoadCollectionOption, callOptions ...grpc.CallOption) (LoadTask, error)

Request Parameters​

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

ReleaseCollectionOption

callOptions

Optional parameters for calling the methods.

grpc.CallOption

ReleaseCollectionOption​

This is an interface type. The releaseCollectionOption struct type implements this interface type.

You can use the NewReleaseCollectionOption() function to get the concrete implementation.

NewReleaseCollectionOption()​

The signature of this method is as follows:

Go
func NewReleaseCollectionOption(collectionName string) *releaseCollectionOption

Parameter

Description

Type

collectionName

Name of the target collection.

string

Return​

LoadTask

Example​

Go
import (
"context"
"github.com/milvus-io/milvus/client/v2/milvusclient"
)

err = cli.ReleaseCollection(ctx, milvusclient.NewReleaseCollectionOption("custom_quick_setup"))
if err != nil {
// handle error
}