milvus-logo
LFAI
< Docs
  • Go

DescribeCollection()

This method gets the detailed information of the specified collection.

Invocation

client.DescribeCollection(stc, collName)

Parameters

ParameterDescriptionType
ctxContext to control API invocation processcontext.Context
collNameName of the collection to describeString

Return

Pointer of entity.Collection that represents the collection to describe.

Errors

  • err: error in the process (if any), possible errors are listed:

    • ErrClientNotReady, error that the client is not connected.

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

    • error that API invocation failed.

Example

collDesc, err := milvusClient.DescribeCollection(
  context.Background(),
  "book",
)
if err != nil {
  log.Fatal("failed to check collection schema:", err.Error())
}
log.Printf("%v\n", collDesc)
Feedback

Was this page helpful?