storage

package
v0.0.0-...-d926d90 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PebblePath

func PebblePath(indexDir string) string

Types

type IndexStore

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

func Open

func Open(path string, opts OpenOptions) (*IndexStore, error)

func (*IndexStore) CandidateDocIDs

func (s *IndexStore) CandidateDocIDs(partition string, tags map[string]string) ([]uint64, error)

func (*IndexStore) CandidateExternalIDs

func (s *IndexStore) CandidateExternalIDs(partition string, tags map[string]string) ([][]byte, error)

func (*IndexStore) Close

func (s *IndexStore) Close() error

func (*IndexStore) CountApplied

func (s *IndexStore) CountApplied() (uint64, error)

func (*IndexStore) CountVectors

func (s *IndexStore) CountVectors() (uint64, error)

func (*IndexStore) DeleteVector

func (s *IndexStore) DeleteVector(externalID []byte, wo *pebble.WriteOptions) error

func (*IndexStore) DocIDForExternalID

func (s *IndexStore) DocIDForExternalID(externalID []byte) (uint64, bool, error)

func (*IndexStore) ExternalIDForDocID

func (s *IndexStore) ExternalIDForDocID(docID uint64) ([]byte, bool, error)

func (*IndexStore) Flush

func (s *IndexStore) Flush() error

func (*IndexStore) GetVector

func (s *IndexStore) GetVector(externalID []byte) (VectorRecord, bool, error)

func (*IndexStore) GetVectorByDocID

func (s *IndexStore) GetVectorByDocID(docID uint64) (VectorRecord, bool, error)

func (*IndexStore) GetVectorFP32ByDocID

func (s *IndexStore) GetVectorFP32ByDocID(docID uint64) ([]float32, bool, error)

func (*IndexStore) IsApplied

func (s *IndexStore) IsApplied(token api.ApplyToken) (bool, error)

func (*IndexStore) IterateVectors

func (s *IndexStore) IterateVectors(fn func(externalID []byte, rec VectorRecord) error) error

func (*IndexStore) IterateVectorsByDoc

func (s *IndexStore) IterateVectorsByDoc(fn func(docID uint64, externalID []byte, rec VectorRecord) error) error

func (*IndexStore) LoadGraphState

func (s *IndexStore) LoadGraphState() (graph.State, bool, error)

func (*IndexStore) LoadSpec

func (s *IndexStore) LoadSpec() (api.IndexSpec, error)

func (*IndexStore) MarkApplied

func (s *IndexStore) MarkApplied(token api.ApplyToken, wo *pebble.WriteOptions) error

func (*IndexStore) NewVectorLookup

func (s *IndexStore) NewVectorLookup() (*VectorLookup, error)

func (*IndexStore) PutVector

func (s *IndexStore) PutVector(externalID []byte, rec VectorRecord, wo *pebble.WriteOptions) error

func (*IndexStore) SaveGraphState

func (s *IndexStore) SaveGraphState(state graph.State, wo *pebble.WriteOptions) error

func (*IndexStore) SaveSpec

func (s *IndexStore) SaveSpec(spec api.IndexSpec) error

func (*IndexStore) SnapshotVectorsMap

func (s *IndexStore) SnapshotVectorsMap() (map[string]VectorRecord, error)

func (*IndexStore) Watermark

func (s *IndexStore) Watermark() (api.ApplyToken, error)

type OpenOptions

type OpenOptions struct {
	DisableWAL       bool
	PebbleCacheBytes int64
	BloomBitsPerKey  int
	BytesPerSync     int
}

type VectorLookup

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

func (*VectorLookup) Close

func (l *VectorLookup) Close() error

func (*VectorLookup) GetVectorByDocID

func (l *VectorLookup) GetVectorByDocID(docID uint64) (VectorRecord, bool, error)

func (*VectorLookup) GetVectorFP32ByDocID

func (l *VectorLookup) GetVectorFP32ByDocID(docID uint64) ([]float32, bool, error)

type VectorRecord

type VectorRecord struct {
	PartitionKey string            `json:"partition_key"`
	Tags         map[string]string `json:"tags,omitempty"`
	VectorFP32   []float32         `json:"vector_fp32"`
}

VectorRecord holds mutable state for a logical vector.

Jump to

Keyboard shortcuts

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