indexer

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embedder

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

Embedder generates and stores embeddings for unembedded chunks.

func NewEmbedder

func NewEmbedder(database *db.DB, provider providers.EmbeddingProvider) *Embedder

func (*Embedder) EmbedCollection

func (e *Embedder) EmbedCollection(ctx context.Context, collection string) error

EmbedCollection embeds all unembedded chunks in a collection.

type Indexer

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

Indexer walks a collection and upserts documents into the DB.

func New

func New(database *db.DB, chunkSize int) *Indexer

func (*Indexer) Index

func (idx *Indexer) Index(ctx context.Context, col config.Collection) (Stats, error)

Index indexes all files in a collection.

type Stats

type Stats struct {
	FilesScanned int
	FilesAdded   int
	FilesUpdated int
	FilesRemoved int
	Duration     time.Duration
}

Stats summarises an index run.

Jump to

Keyboard shortcuts

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