milvus-logo
Star
0
Forks
0
Get Started

DescribeIndex()

This method gets the detailed information of an index.

Invocation

client.DescribeIndex(ctx, collName, fieldName)

Parameters

ParameterDescriptionType
ctxContext to control API invocation processcontext.Context
collNameName of the collection to describe index onString
fieldNameName of the field on which to describe the indexString

Return

A slice of entity.Index that specifies the indexes on the vector field.

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 the specified field is not valid.

  • error that API invocation failed.

Example

indexInfo, err := milvusClient.DescribeIndex(
  context.Background(),
  "book",
  "book_intro"
)
if err != nil {
  log.Fatal("fail to describe index:", err.Error())
}
log.Println(indexInfo)