milvus-logo
LFAI
< Docs
  • Go

DropIndex()

This method drops the specified index and the corresponding index file.

Invocation

client.DropIndex(ctx, collName, fieldName)

Parameters

ParameterDescriptionType
ctxContext to control API invocation processcontext.Context
collNameName of the collection to drop index fromString
fieldNameName of the vector field to drop index fromString

Return

No return.

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

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

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?