Quiver
A fast, embeddable vector database written from scratch in Rust.
Store vectors with JSON metadata, find their nearest neighbours with HNSW, exact or k-d tree search, and filter as you go. Run it as a server with REST and gRPC, or embed it in your Rust program.
git clone https://github.com/HilthonTT/quiver && cd quiver && cargo run --release -p quiver-serverFeatures
A whole vector database, no dependencies to run.
One binary serves REST on port 6900 and gRPC on 6901. Collections, indexes, the write-ahead log and the snapshot archives are all Quiver's own code.
Three indexes
HNSW for large collections, exact flat search, and a k-d tree for exact search in low dimensions.
Five metrics
Cosine, Euclidean, dot product, Manhattan and Hamming. Distances are always lower = closer.
Filtered search
MongoDB-style metadata filters ($gte, $in, $or, nested fields), applied during the index traversal.
Data operations
Merge or replace metadata, count and delete by filter, search by id, recommend, distance thresholds.
Durable storage
A checksummed write-ahead log with checkpoints by default, RocksDB behind a feature flag, or memory.
Snapshots
SHA-256-verified .tar.gz backups you can download, upload and restore, with retention and a schedule.
API keys
REST and gRPC behind read-only and read-write keys, compared in constant time.
Embeddable
Run it as a server, or link the quiver-db crate and keep everything in-process.
In code
From Python, from curl, or in-process.
The same collection, three ways in. Every client speaks the same JSON filters and returns the same lower-is-closer distances.
# pip install ./clients/python
from quiver import Client
client = Client("http://localhost:6900")
books = client.get_or_create_collection("books", dimension=3)
books.upsert([
("dune", [0.9, 0.1, 0.0], {"year": 1965}),
("hobbit", [0.1, 0.9, 0.2], {"year": 1937}),
])
for hit in books.search([1.0, 0.0, 0.0], k=1, filter={"year": {"$gt": 1950}}):
print(hit.id, hit.distance) # dune 0.006116271018981934
# create a collection, add a point, search
curl -X POST localhost:6900/collections \
-H 'content-type: application/json' \
-d '{"name": "places", "dimension": 2, "metric": "euclidean"}'
curl -X POST localhost:6900/collections/places/points \
-H 'content-type: application/json' \
-d '{"points": [{"id": "brussels", "vector": [4.35, 50.85]}]}'
curl -X POST localhost:6900/collections/places/search \
-H 'content-type: application/json' \
-d '{"vector": [5.5, 50.5], "k": 1}'
// cargo add quiver-db --git https://github.com/HilthonTT/quiver
use quiver_db::{CollectionConfig, Database, Point};
use serde_json::json;
let db = Database::open("./quiver-data")?;
let books = db.create_collection("books", CollectionConfig::new(3))?;
books.upsert([
Point::new("dune", vec![0.9, 0.1, 0.0])
.with_metadata(json!({"year": 1965})),
])?;
for hit in books.search(&[1.0, 0.0, 0.0], 1)? {
println!("{} {}", hit.id, hit.distance);
}
Clone it, run it, search.
One command builds and starts the server with a local data directory. The docs cover the rest, from filters to snapshots to API keys.
git clone https://github.com/HilthonTT/quiver && cd quiver && cargo run --release -p quiver-server