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: StringName of the collection whose index to drop. Required.
field_name: StringName of the indexed field.
index_name: StringName of the index to drop. When empty, the index on
field_nameis 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?;