Skip to main content

Alter Collection Properties

This operation alters the properties of a collection.

POST
/v2/vectordb/collections/alter_properties
Cluster Endpoint

The base URL for this API is in the following format:

https://${CLUSTER_ENDPOINT}

📘Notes
export CLUSTER_ENDPOINT=""
Parameters
Authorizationstringheaderrequired

The authentication token should be an API key with appropriate privileges or a pair of colon-joined username and password, like username:password.

Example Value: Bearer {{TOKEN}}
Request Bodyapplication/json
dbNamestring

The name of the database which the collection belongs to. Setting this to a non-existing database results in an error.

collectionNamestringrequired

The name of the target collection. Setting this to a non-existing collection results in an error.

propertiesobjectrequired

The properties of the collection to alter.

mmmap.enabledboolean

Whether to enable the memory-mapped feature for the collection. Setting this to true allows the collection to be accessed directly from disk without loading it into memory, which can extend collection capacity.

collection.ttl.secondsinteger

The time-to-live (TTL) of the collection in seconds. Setting this to a non-zero values enables automatic deletion of expired documents from the collection after the specified number of seconds.

partitionkey.isolationboolean

Whether to enable partition key isolation for the collection. Setting this to true ensures that documents with the same partition key are always stored in the same partition, which can improve query performance.

export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/collections/alter_properties" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"collectionName": "test_collection",
"properties": {
"mmmap.enabled": true
}
}'
Responses200 - application/json
codeinteger

Response code.

dataobject

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

{
"code": 0,
"data": {}
}