AlterCollectionProperties()

Alters the properties of a collection.

pub async fn alter_collection_properties(&self, request: AlterCollectionPropertiesRequest) -> Result<()>

Request Syntax

let request = AlterCollectionPropertiesRequest::builder()
    .collection_name("books")
    .property("collection.ttl.seconds", "60")
    .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 to alter. Required.

  • properties: HashMap<String, String>

    Properties to set or update. At least one property is required. Use property() to add one.

RETURN TYPE:

Result<()>

RETURNS:

Returns an empty result indicating success. Returns Error on failure.

Example

let request = AlterCollectionPropertiesRequest::builder()
    .collection_name("books")
    .property("collection.ttl.seconds", "60")
    .build()?;
client.alter_collection_properties(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?