🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz
< Docs
  • Go

AlterCollectionProperties()

This method changes the specified properties of a collection.

func (c *Client) AlterCollectionProperties(ctx context.Context, option AlterCollectionPropertiesOption, callOptions ...grpc.CallOption) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

AlterCollectionFieldPropertiesOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

AlterCollectionPropertiesOption

This is an interface type. The alterCollectionPropertiesOption struct type implements this interface type.

You can use the NewAlterCollectionPropertiesOption() function to get the concrete implementation.

NewAlterCollectionPropertiesOption

The signature of this method is as follows:

func NewAlterCollectionPropertiesOption(collection string) *alterCollectionPropertiesOption

Parameter

Description

Type

collection

Name of the target collection.

string

Return

Null

Example

err = cli.AlterCollectionProperties(ctx, milvusclient.NewAlterCollectionPropertiesOption("my_collection").WithProperty(common.CollectionTTLConfigKey, 60))
if err != nil {
    // handle error
}

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?