dynamic

package
v1.26.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultThreshold = 10_000
)

Variables

This section is empty.

Functions

func ParseAndValidateConfig

func ParseAndValidateConfig(input interface{}) (schemaConfig.VectorIndexConfig, error)

ParseAndValidateConfig from an unknown input value, as this is not further specified in the API to allow of exchanging the index type

Types

type UserConfig

type UserConfig struct {
	Distance  string          `json:"distance"`
	Threshold uint64          `json:"threshold"`
	HnswUC    hnsw.UserConfig `json:"hnsw"`
	FlatUC    flat.UserConfig `json:"flat"`
}

func NewDefaultUserConfig

func NewDefaultUserConfig() UserConfig

func (UserConfig) DistanceName

func (u UserConfig) DistanceName() string

func (UserConfig) IndexType

func (u UserConfig) IndexType() string

IndexType returns the type of the underlying vector index, thus making sure the schema.VectorIndexConfig interface is implemented

func (*UserConfig) SetDefaults

func (u *UserConfig) SetDefaults()

SetDefaults in the user-specifyable part of the config

Jump to

Keyboard shortcuts

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