Skip to content

api: reconsider SearchResults flat-field exposure + pub(crate) field accessors (pre-1.0) #33

@Fieldnote-Echo

Description

@Fieldnote-Echo

From the pre-release (Perplexity) audit, §9.

SearchResults.{scores,indices} are pub Vec<…>. Kept public deliberately for now: the Python binding moves them out by value for a zero-copy hand-off into numpy; switching to fn scores(&self) -> &[f32] accessors would force a clone or an into_parts()-style consuming API. Documented as intentional in src/lib.rs. Worth revisiting before a 1.0 stability commitment — e.g. an into_parts() consuming accessor that preserves zero-copy while letting the internal representation evolve.

Minor, same theme: RankQuant.{packed,bits} are pub(crate) fields; an audit suggestion is pub(crate) fn packed(&self) -> &[u8] accessors for read-only crate-internal access. Purely internal (no external surface), low priority.

Both are pre-1.0 API-shape decisions, not bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions