Skip to main content

DropIndexProperties

This operation removes one or more properties from an existing index.

go
func (c *Client) DropIndexProperties(ctx context.Context, opt DropIndexPropertiesOption, callOptions ...grpc.CallOption) error

Request Syntax​

Creates the request for DropIndexProperties().

go
option := milvusclient.NewDropIndexPropertiesOption(collectionName, indexName, keys...)

err := client.DropIndexProperties(ctx, option)

PARAMETERS:

  • collectionName (string) -

    [REQUIRED]

    The name of the target collection.

  • indexName (string) -

    [REQUIRED]

    The name of the index.

  • keys (...string) -

    [REQUIRED]

    The keys for DropIndexProperties.

BUILDER METHODS:

  • NewDropIndexPropertiesOption(collectionName string, indexName string, keys ...string)

    Creates options to drop index properties. collectionName specifies the collection, indexName specifies the index, and keys lists the property keys to remove.

RETURN TYPE:

error

RETURNS:

Returns nil after the index properties are dropped. Returns an error if the operation fails.

ERROR HANDLING:

  • error

    The operation fails. Request construction or the RPC fails. Check err != nil for failure details.

Example​

Demonstrates DropIndexProperties() usage.

go
import (
"context"

"github.com/milvus-io/milvus/client/v3/milvusclient"
)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

cli, err := milvusclient.New(ctx, &milvusclient.ClientConfig{Address: "YOUR_CLUSTER_ENDPOINT"})
if err != nil {
// handle error
}
defer cli.Close(ctx)

err = cli.DropIndexProperties(ctx, milvusclient.NewDropIndexPropertiesOption("books", "vector_index", "mmap.enabled"))
if err != nil {
// handle error
}
Minimum SDK versionv3.0.x
Was this page helpful?