Skip to main content

Module handle

Module handle 

Source
Expand description

Sparse vector index handle with mmap persistence.

Commit writes a flat binary mmap format (sparse.mmap) + bincode side files. Open mmap’s the posting data (O(1)), vectors + dims loaded lazily. Search uses mmap iterators when available (no RAM postings or vectors needed). Mutations load postings + vectors into RAM on first access, set dirty flag.

Two storage modes:

  • Filesystem (create/open): files live directly in the given directory.
  • BlobStore (create_with_store/open_with_store): source of truth is the BlobStore; a local tmpdir is used as mmap cache. Cleaned up on Drop.

Structs§

SparseHandle