milvus-logo
LFAI
< Docs
  • Go

LoadPartitions()

This method loads the data of specific partitions into memory.

func (c *GrpcClient) LoadPartitions(ctx context.Context, collName string, partitionNames []string, async bool) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

collName

Name of a collection

string

partitionNames

Names of the partitions to load.

string

async

Whether this operation is asynchronous.

bool

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 specified collection does not exist.

  • Partitions with the specified name do not exist.

  • The call to this API fails.

Example

// load partitions
errPar := mc.LoadPartitions(context.Background(), collectionName, []string{"_default", "p1"}, true)
if errPar != nil {
   log.Fatal("failed to load partition:", errPar.Error())
}

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?