Skip to main content

Module vector_store

Module vector_store 

Source
Expand description

Vector Store

Segment-based vector storage with HNSW indexing and metadata support. Inspired by Chroma and Milvus architectures.

§Architecture

  • Collection: A named set of vectors with a fixed dimension
  • Segment: A unit of storage (Growing → Sealed → Flushed)
  • HNSW Index: Built when segment is sealed
  • Metadata: Per-vector key-value pairs with filtering

§Segment Lifecycle

  1. Growing: Accepts writes, no HNSW index (brute-force search)
  2. Sealed: Immutable, HNSW index is built
  3. Flushed: Written to disk (future)

Structs§

SearchResult
Result of a vector search
SegmentConfig
Configuration for vector segments
VectorCollection
Vector collection containing multiple segments
VectorSegment
A vector segment containing vectors, metadata, and optional index
VectorStore
Multi-collection vector store

Enums§

SegmentState
Segment state in its lifecycle
VectorStoreError
Vector store errors

Type Aliases§

SegmentId
Unique identifier for a segment
VectorId
Unique identifier for a vector within a collection