index

package
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package index prepares and embeds source-bound documents before sending precomputed records to a native index. The encoder and database need not share a transaction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	vectorstore.Upserter
	CheckDocuments(context.Context, vectorstore.SpaceID, []*document.Document) error
}

Destination checks provider-specific input constraints before model I/O. Upsert must still validate the current collection and the returned coordinates.

type Writer

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

func NewWriter

func NewWriter(config WriterConfig) (*Writer, error)

func (*Writer) Write

func (w *Writer) Write(ctx context.Context, documents []*document.Document) error

type WriterConfig

type WriterConfig struct {
	Destination Destination
	Encoder     *vector.Encoder
	Formatter   document.Formatter
	Batching    tokenizer.BatchConfig
}

Jump to

Keyboard shortcuts

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