DropIndex()

Drops an index from a collection.

pub async fn drop_index(&self, request: DropIndexRequest) -> Result<()>

Request Syntax

let request = DropIndexRequest::builder()
    .collection_name("books")
    .field_name("embedding")
    .index_name("embedding_idx")
    .build()?;

REQUEST FIELDS:

  • database_name: Option<String>

    Name of the target database; uses the default database when empty.

  • collection_name: String

    Name of the collection whose index to drop. Required.

  • field_name: String

    Name of the indexed field.

  • index_name: String

    Name of the index to drop. When empty, the index on field_name is dropped.

RETURN TYPE:

Result<()>

RETURNS:

Returns Ok(()) on success, or an Error on failure.

Example

let request = DropIndexRequest::builder()
    .collection_name("books")
    .index_name("embedding_idx")
    .build()?;
client.drop_index(request).await?;

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?