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

RefreshLoad()

This method refreshes the load state of the specified collection.

Go
func (c *Client) RefreshLoad(ctx context.Context, option RefreshLoadOption, 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.

RefreshLoadOption

callOptions

Optional parameters for calling the methods.

grpc.CallOption

RefreshLoadOption​

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

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

NewRefreshLoadOption()​

The signature of this method is as follows:

Go
func NewRefreshLoadOption(collectionName string) *refreshLoadOption

Parameter

Description

Type

collectionName

Name of the target collection.

string

Return​

LoadTask

Example​

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

loadTask, err := cli.RefreshLoad(ctx, milvusclient.NewRefreshLoadOption(collectionName))
if err != nil {
// handle err
}
err = loadTask.Await(ctx)
if err != nil {
// handler err
}