Skip to main content

Module in_memory

Module in_memory 

Source
Expand description

In-memory brute-force cosine VectorBackend.

No external dependencies and always available (not behind a feature flag). Intended for tests and tiny document sets — O(n·d) per query is fine up to ~10⁴ vectors; beyond that switch to SqliteVecBackend (exact KNN) or UsearchBackend (HNSW ANN).

Structs§

InMemoryVectorBackend
A brute-force cosine vector backend backed by a Vec guarded by a mutex.