Skip to content

Add Debug impls for the public index types (params-only) #81

@Fieldnote-Echo

Description

@Fieldnote-Echo

Summary

None of the public index types — Rank, RankQuant, Bitmap, SignBitmap — nor SearchResults expose a Debug impl. The only Debug in src/ is on the internal SimdTier enum. Downstream users can't inspect an index at runtime without querying individual fields.

Ask

Add concise hand-written Debug impls (not #[derive]) that print the shape parameters only, e.g.:

RankQuant { dim: 1024, bits: 2, n_vectors: 50_000 }
Bitmap { dim: 256, n_top: 64, n_vectors: 50_000 }

Do not dump the packed buffers — a derived Debug on these would print megabytes of bytes. Params-only (dim/bits/n_top/n_vectors, maybe bytes-per-doc) keeps it useful in a pipeline log.

Acceptance

  • Debug for Rank, RankQuant, Bitmap, SignBitmap, SearchResults
  • Output is parameter summary, never the storage vectors
  • {:?} smoke test per type

Filed from an external technical review (May 2026); verified against v0.2.0 (only SimdTier derives Debug today).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions