Skip to the content
hinny
Back to news

Product

Hinny 0.4: named vectors, pagination, and server metrics

Hinny 0.4 brings multiple named vector fields per document, operational controls for hinny-server, and prebuilt server and C library downloads for macOS and Linux.

Hinny 0.4 is out. It adds named multi-vector fields per document, offset pagination, full-document reads, and operational controls for hinny-server.

Several named vectors per document

A document can now hold up to 255 vector fields, each with its own dimensions, distance metric (cosine, dot, or euclidean), and independent centroid generations. Existing single-vector schemas keep the unnamed default field as "", so nothing breaks when adding named fields alongside it.

docs = db.namespace(
    "docs",
    text={"title": 2.0, "body": 1.0},
    vector=384,
    vectors={
        "title_emb": {"dimensions": 384, "metric": "dot"},
        "image": 512,
    },
)

docs.upsert(
    1,
    text={"title": "Lease", "body": "The apartment on Elm Street"},
    vector=body_vec,
    vectors={"title_emb": title_vec, "image": img_vec},
)

hits = docs.query(
    text="apartment lease",
    vector=q_body,
    vectors={"image": q_img},
    vector_weights={"": 0.6, "image": 0.4},
    limit=10,
    offset=0,
)
Declaring, writing, and querying multiple named vector fields with mixed metrics and per-field fusion weights.

Queries run the lexical retriever and every queried vector field in parallel on the query pool and combine them through N-way convex or RRF fusion (fuse_many). By default the lexical side keeps text_weight and the remainder splits equally across queried vector fields, overridable with vector_weight. Each hit reports per-field scores in vector_scores, and explain() reports per-field depths, counts, and score ranges.

On disk, multi-vector namespaces introduce Segment v10 (with an EXTS extension directory at header byte 192 and a required VECS table), Manifest Format 9, Schema v6, and WAL tag 2. All extensions and vector sections live inside the checksummed body so verify() covers them automatically.

Segment v10 layout. Field 0 stays in the existing vector slot; fields 1..N live in the EXTS/VECS directory inside the checksummed body. Single-vector namespaces without named fields continue writing v8/v9 unchanged.

Pagination, full documents, and patches

  • Offset pagination: Query::offset(n) across Rust, JSON, C, HTTP (/query and /explain), Python, and Node.js. Skipped hits are dropped before blob hydration when no order_by is set, and tie-breaking uses the public document key so pages stay deterministic.
  • Full document fetch: StoredDocument and document(key) on Namespace and Snapshot (plus hinny_document in C and GET /v1/namespaces/{ns}/documents/{key}?full=true in HTTP) return attributes, stored text, version, and default + named vectors from one snapshot.
  • Removing vectors in patches: Patch::clear_vector() drops the default vector and Patch::remove(name) now drops named vector fields too. Partial patches validate all fields upfront and refuse to silently erase unstored text postings if a namespace evolved from store_text(false) to true.
  • Binding parity: hinny::key(&str) is exported in Rust and shared across C, Python, and Node.js. Python and Node.js gain read-only handles (open_read_only, refresh), cross-database forks (fork_into), and per-field text analyzers. hinny-c adds a dedicated --profile c (panic = "unwind") and panic containment on close.

Operating hinny-server and replicas

hinny-server now supports multi-tenant deployments with bounded open handles, browser access, and Prometheus monitoring, while read replicas validate staged generations before publishing.

FeatureInterfaceBehaviour
Idle & LRU eviction--idle-timeout, --max-open-namespacesCloses idle namespaces and checkpoints memory; never evicts namespaces with in-flight requests
CORS--cors-origin <origin|*>Handles OPTIONS preflights (204) before auth; attaches Allow-Origin and Vary: Origin to all responses
Prometheus metricsGET /metrics (behind --token)Exports request counts, durations, evictions, and open-namespace gauges without opening closed namespaces
Inspection routes/explain, /verify, /versions, ?full=trueAvailable on both primaries and read replicas
Staged replicashinny-replica syncOpens and verifies incoming generations before replacing the live manifest or pruning old files
Operational features added to hinny-server and hinny-replica in 0.4.0.

Installing 0.4.0

Install the Rust crate from crates.io or the Node.js package from npm. On Python 3.11 or later, install Hinny from PyPI with uv or pip. Prebuilt wheels are available for macOS and Linux on Intel and ARM64. For the standalone server or C library, download the archive for your platform from the GitHub release.

# In a uv project
uv add hinny

# Or in a virtual environment
pip install hinny
Installing Hinny 0.4.0.

Compatibility and upgrading

  • Namespaces with no vector or only the legacy unnamed vector keep writing 0.3-compatible formats (Manifest Format 7/8, Segment v8/v9, Schema v2–5). Adding a named vector field evolves an existing 0.3 namespace in place.
  • For hinny-server deployments using read replicas, upgrade replicas to 0.4 before creating multi-vector (Format 9) namespaces on the primary.
  • Every release format (v0.1 through v0.4) is kept as a committed fixture and verified on every test run. See the docs and storage integrity post for format details.