Repository navigation
v0.2.0
This release introduces the new stable pre-1.0 API direction for numpy-vector-store: a small, typed, exact cosine vector store built on NumPy, with explicit composable filtering and no framework-specific metadata query layer.
Highlights
- Added
VectorStore[TMetadata]for typed metadata payloads. - Added
VectorHit(index, value, metadata)as the typed search result object. - Added
VectorStore.add(vectors, metadata)as the preferred insertion API. - Added
VectorStore.cosine_search(...)as the preferred explicit cosine similarity search API. - Added
within_rowsfor efficient prefiltered search using row indexes from Python, NumPy, pandas, SQL, or any external filtering system. - Added
__len__support. - Simplified persistence around trusted local
.npzfiles containing onlyvectorsandmetadata.
Compatibility
The older 0.1 methods are still available but now deprecated:
add_vectors(...)still works and delegates toadd(...).search(...)still works and returns the same tuple shape as before.- Both methods now emit
DeprecationWarning.
metadata_schema has been removed. The supported model is now: store metadata as an opaque row payload, perform filtering externally, and pass matching row indexes to within_rows.
Breaking Changes
- Python support now requires Python
>=3.10. metadata_schemais no longer supported.- The documented search result shape has moved from tuples to
VectorHit. - The preferred search method is now
cosine_search, withmin_valueinstead of the legacyscore_cutoff.
Why This Release Matters
0.2.0 defines the project’s intended API shape before broader adoption: explicit cosine search, typed metadata, simple local persistence, and composable filtering without taking on a metadata query language or embedding framework responsibilities.