メインコンテンツまでスキップ

Alter Collection Properties (V2)

This operation alters the properties of a collection.

POST/v2/vectordb/collections/alter_properties
Connection Endpoint

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

https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530

📘Notes
  • Use the cluster endpoint if you are using serving clusters.
    • Free & Serverless

      https://{cluster-id}.serverless.{region}.vectordb.zillizcloud.com

    • Dedicated

      https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530

  • You need to fill in ${CLUSTER_ENDPOINT} with that of your Zilliz Cloud cluster.
  • To get the endpoint, use the Describe Cluster V2 API to extract the values from the responses.
export CLUSTER_ENDPOINT="https://{cluster-id}.{region}.vectordb.zillizcloud.com:19530"
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. If you are using a project endpoint, only a valid API key with sufficient permissions applies.

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. If not specified, the default database applies.

collectionNamestringrequired

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

propertiesobjectrequired

The collection properties to alter. Keys must be actual Milvus property names.

collection.ttl.secondsinteger

The time-to-live (TTL) period of the collection in seconds.

collection.autocompaction.enabledboolean

Whether to enable automatic compaction for the collection.

collection.descriptionstring

The description of the collection.

collection.on.truncatingboolean

Whether the collection is currently truncating. When true, compaction is forbidden.

collection.function.allowInsertNonBM25FunctionOutputsboolean

Whether to allow inserting non-BM25 function outputs.

collection.insertRate.max.mbnumber

The maximum insert rate limit in MB/s.

collection.insertRate.min.mbnumber

The minimum insert rate limit in MB/s.

collection.deleteRate.max.mbnumber

The maximum delete rate limit in MB/s.

collection.deleteRate.min.mbnumber

The minimum delete rate limit in MB/s.

collection.bulkLoadRate.max.mbnumber

The maximum bulk load rate limit in MB/s.

collection.bulkLoadRate.min.mbnumber

The minimum bulk load rate limit in MB/s.

collection.queryRate.max.qpsnumber

The maximum query rate limit in QPS.

collection.queryRate.min.qpsnumber

The minimum query rate limit in QPS.

collection.searchRate.max.vpsnumber

The maximum search rate limit in VPS.

collection.searchRate.min.vpsnumber

The minimum search rate limit in VPS.

collection.diskProtection.diskQuota.mbnumber

The maximum disk quota for the collection in MB.

collection.replica.numberinteger

The number of replicas for the collection.

collection.resource_groupsstring

A comma-separated list of resource group names associated with the collection.

mmap.enabledboolean

Whether to enable memory mapping for the collection.

partitionkey.isolationboolean

Whether to enable partition key isolation for the collection.

ttl_fieldstring

The name of the field to use for TTL-based expiration.

warmup.scalarFieldboolean

Whether to preload scalar field data into memory on load.

warmup.scalarIndexboolean

Whether to preload scalar index data into memory on load.

warmup.vectorFieldboolean

Whether to preload vector field data into memory on load.

warmup.vectorIndexboolean

Whether to preload vector index data into memory on load.

export TOKEN="db_admin:xxxxxxxxxxxxx"

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

Response code.

dataobject

Returns an error message.

codeinteger

Response code.

messagestring

Error message.

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