milvus-logo
LFAI
< Docs
  • Go

ShowPartitions()

This method lists all partitions in the specified collection.

Invocation

client.ShowPartitions(ctx, collName)

Parameters

ParameterDescriptionType
ctxContext to control API invocation processcontext.Context
collNameName of the collection in which to list all partitionsString

Return

An array of entity.Partition that represents the partitions in the collection.

Errors

err: error in the process (if any). Possible errors are listed below:

  • ErrClientNotReady, error that the client is not connected.

  • ErrCollectionNotExists, error that collection with the specified name does not exist.

  • error that API invocation failed.

Example

listPar, err := milvusClient.ShowPartitions(
  context.Background(),
  "book",
)
if err != nil {
  log.Fatal("failed to list partitions:", err.Error())
}
log.Println(listPar)
Feedback

Was this page helpful?