Help us shape the future of Go! Take the 2026 Go Developer Survey

vector

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OperationQueuedAck declares a native durable queued acknowledgement.
	OperationQueuedAck = "queued-ack"
	// OperationScoreThreshold declares score_threshold support.
	OperationScoreThreshold = "score-threshold"
	// OperationFilter declares portable filter support over record metadata.
	OperationFilter = "filter"
	// OperationQueryByID declares by_id query support.
	OperationQueryByID = "query-by-id"
	// OperationMetricCosine, OperationMetricDotProduct and
	// OperationMetricEuclidean declare the distance metrics a component
	// accepts, on CreateCollection and on Query. Metrics that are not declared
	// must be rejected with INVALID_ARGUMENT.
	OperationMetricCosine     = "metric-cosine"
	OperationMetricDotProduct = "metric-dot-product"
	OperationMetricEuclidean  = "metric-euclidean"
)

Capability opt-ins declared through the `operations` list of a component in tests/config/vector/tests.yml. Capabilities that are not declared must be reported as UNIMPLEMENTED (or INVALID_ARGUMENT where the contract says so) rather than silently ignored.

Variables

This section is empty.

Functions

func ConformanceTests

func ConformanceTests(t *testing.T, props map[string]string, v vector.Vector, cfg TestConfig)

Types

type TestConfig

type TestConfig struct {
	utils.CommonConfig

	// CreateCollectionMetadata is passed verbatim to CreateCollection.
	CreateCollectionMetadata map[string]string `mapstructure:"createCollectionMetadata"`
	// UpsertMetadata is passed verbatim to Upsert and Delete.
	UpsertMetadata map[string]string `mapstructure:"upsertMetadata"`
	// QueryMetadata is passed verbatim to Query, BatchQuery and Get.
	QueryMetadata map[string]string `mapstructure:"queryMetadata"`
	// Dimensions is passed as CreateCollectionRequest.Dimensions and drives
	// the generated test vectors.
	Dimensions int `mapstructure:"dimensions"`
	// WaitTimeout is used with INDEXING_MODE_WAIT_FOR_COMPLETION.
	WaitTimeout time.Duration `mapstructure:"waitTimeout"`
}

TestConfig is the vector conformance configuration. Provider-specific collection settings such as index parameters travel through CreateCollectionMetadata, mirroring the component contract; dimensions and the metric are typed request fields.

func NewTestConfig

func NewTestConfig(componentName string, operations []string, configMap map[string]interface{}) (TestConfig, error)

Jump to

Keyboard shortcuts

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