跳到主要内容
版本:v2.6.x

NewCustomAnnParam()

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

Go
func NewCustomAnnParam() CustomAnnParam

RETURNS:

AnnParam

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

Example

Go
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)