search

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VectorColumnName = "vector"
	TopKExpansion    = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Search(ctx context.Context, query []float32, topK int) ([]ProductImage, error)
}

type MilvusSearchHandler

type MilvusSearchHandler struct {
	// contains filtered or unexported fields
}

MilvusSearchHandler implements Handler interface{}

func NewMilvusSearchHandler

func NewMilvusSearchHandler(
	client client.Client,
	vectorDim int,
	metricType entity.MetricType,
	nProbe int,
	collectionName string) MilvusSearchHandler

NewMilvusSearchHandler returns a new MilvusSearchHandler

func (MilvusSearchHandler) Search

func (h MilvusSearchHandler) Search(ctx context.Context, query []float32, topK int) ([]ProductImage, error)

Search implements Handler interface{}

type ProductImage

type ProductImage struct {
	ProductId string
	ImageId   string
	Distance  float32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL