NewCustomAnnParam()

This function creates a custom ANN search parameter set that allows you to configure arbitrary search parameters.

func NewCustomAnnParam() CustomAnnParam

RETURNS:

AnnParam

An ANN search parameter instance. Pass this to a search option via WithAnnParam().

Example

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

// Create ANN search parameters
param := index.NewCustomAnnParam()

// Use with a search option
option := milvusclient.NewSearchOption("collection_name", limit, vectors).
    WithAnnParam(param)

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?