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

Milvus
Zilliz
< Docs
  • Go

DropCollection()

This method drops a collection.

func (c *Client) DropCollection(ctx context.Context, option DropCollectionOption, 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.

DropCollectionOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

DropCollectionOption

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

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

NewDropCollectionOption

The signature of this method is as follows:

func NewDropCollectionOption(name string) *dropCollectionOption

Parameter

Description

Type

name

Name of the collection to drop.

string

Return

Null

Example

import (
        "context"
        "github.com/milvus-io/milvus/client/v2/milvusclient"
)

err = cli.DropCollection(ctx, milvusclient.NewDropCollectionOption("customized_setup_2"))
if err != nil {
       // handle err
}

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?