Metadata-Version: 2.4
Name: zvec-rust
Version: 0.1.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Summary: Rust-native vector collection engine with a Python API (WAL durability, ANN, hybrid search).
Keywords: vector-database,ann,hnsw,ivf,embeddings,search,rust
Author-email: Suneel Marthi <smarthi@apache.org>
License: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/smarthi/zvec-rust/blob/main/CHANGELOG.md
Project-URL: Documentation, https://github.com/smarthi/zvec-rust/tree/main/docs
Project-URL: Homepage, https://github.com/smarthi/zvec-rust
Project-URL: Issues, https://github.com/smarthi/zvec-rust/issues
Project-URL: Repository, https://github.com/smarthi/zvec-rust

# zvec-rust

`zvec-rust` is a Rust-native vector collection engine with a compiled Python API.
It provides durable storage (snapshot + write-ahead log), dense/sparse vector
search, scalar filtering, full-text search, and hybrid (multi-route) retrieval
with pluggable rerankers.

## Install

```bash
pip install zvec-rust
```

## Quick start

```python
import zvec_rust as zvec

schema = zvec.CollectionSchema(
    name="docs",
    vectors=[zvec.VectorSchema("embedding", zvec.DataType.VECTOR_FP32, dimension=4)],
    fields=[zvec.FieldSchema("category", zvec.DataType.STRING)],
)

col = zvec.create_and_open("./data/docs", schema, durability_mode="interval")
col.insert([
    zvec.Doc("a", vectors={"embedding": [1.0, 0.0, 0.0, 0.0]}, fields={"category": "blog"}),
    zvec.Doc("b", vectors={"embedding": [0.0, 1.0, 0.0, 0.0]}, fields={"category": "news"}),
])

# Vector search with a scalar filter.
hits = col.query(
    zvec.Query(field_name="embedding", vector=[1.0, 0.0, 0.0, 0.0]),
    topk=5,
    filter="category == 'blog'",
)

# Hybrid (multi-route) search fused by a reranker.
hits = col.query(
    [
        zvec.Query(field_name="embedding", vector=[1.0, 0.0, 0.0, 0.0]),
        zvec.Query(field_name="embedding", vector=[0.0, 1.0, 0.0, 0.0]),
    ],
    topk=5,
    reranker=zvec.RrfReRanker(),
)
```

## Highlights

- Durability modes: `always`, `interval`, `manual` (WAL + checkpoint + manifest).
- Crash-recovery: committed ops are replayed from the WAL on reopen.
- ANN index params: HNSW, IVF, Flat, DiskANN, Vamana, HNSW-RaBitQ.
- Hybrid retrieval: `RrfReRanker`, `WeightedReRanker`, `CallbackReRanker`.
- Non-throwing `*_status` API surface returning `Status` objects.

See the project repository for the full API reference, production guide, and
parity audit.

Licensed under Apache-2.0.

