Skip to content

v0.9.0 — Sparse Vectors, Hybrid Search, FlatIndex, BinaryFlatIndex

Latest

Choose a tag to compare

@matte1782 matte1782 released this 27 Feb 01:20
· 69 commits to main since this release

What's New in v0.9.0

Sparse Vectors (RFC-007)

  • SparseVector — CSR format sparse vector storage with 6 enforced invariants
  • SparseStorage — Inverted index with insert, search, delete, batch operations
  • SparseSearcher — Dot product similarity search
  • WASM bindings: initSparseStorage(), insertSparse(), searchSparse()
  • Persistence format v2 with CRC32 checksum and backward compatibility

RRF Hybrid Search (RFC-007)

  • HybridSearcher — Combines dense (HNSW) + sparse retrieval
  • Reciprocal Rank Fusion (RRF) with configurable k parameter (default k=60)
  • Linear fusion with alpha weight parameter
  • Per-source rank/score tracking in HybridSearchResult
  • WASM binding: hybridSearch()

FlatIndex

  • FlatIndex — Brute-force exact nearest neighbor search (100% recall)
  • O(1) insert, O(n·d) search with 4 distance metrics (Cosine, DotProduct, L2, Hamming)
  • Soft delete with bitmap tracking + auto-compaction
  • Binary quantization (32x memory reduction)
  • Snapshot persistence with CRC32 checksum

BinaryFlatIndex (PR #7 by @marlon-costa-dc)

  • BinaryFlatIndex — Native binary vector storage with SIMD-accelerated Hamming distance
  • O(1) insert (~1μs), O(n) search with 32x memory reduction
  • HNSW binary methods: insert_binary(), search_binary(), search_binary_with_ef()
  • WASM integration with JsIndexType runtime selection

Safety & Quality (Hostile Reviewer Remediation)

All 30 findings from the hostile reviewer audit have been addressed:

Critical fixes:

  • Custom Deserialize for SparseVector enforcing all 6 invariants
  • FusionMethod::linear() returns Result instead of panicking (prevents WASM trap)
  • NaN/Infinity validation unconditional in ALL 4 WASM insert functions
  • get_binary_vector() returns Result instead of panicking

Test coverage:

  • 1018 library unit tests + 36 integration tests
  • 3 new fuzz targets (sparse_vector, sparse_storage, flat_index)
  • New integration test suites for FlatIndex and BinaryFlatIndex

Install

Rust:

[dependencies]
edgevec = "0.9.0"

npm:

npm install edgevec@0.9.0

Contributors

Full Changelog: v0.8.0...v0.9.0