Skip to content

docs(index): fix stale default values in HnswBuildParams doc comments - #8140

Open
wombatu-kun wants to merge 1 commit into
lance-format:mainfrom
wombatu-kun:docs/hnsw-build-params-stale-defaults
Open

docs(index): fix stale default values in HnswBuildParams doc comments#8140
wombatu-kun wants to merge 1 commit into
lance-format:mainfrom
wombatu-kun:docs/hnsw-build-params-stale-defaults

Conversation

@wombatu-kun

Copy link
Copy Markdown
Contributor

The three builder methods on HnswBuildParams document default values that no longer match impl Default.

Method Doc said Default gives
max_level 8 7
num_edges 30 20
ef_construction 100 150

The format spec table in docs/src/format/index/vector/index.md already lists the correct values, so these builder doc comments are the only place left stating the old ones.

Also fixes the max_level field doc, which currently reads "max level ofm".

Docs only, no behavior change.

One question while I am here: lance.util.HNSW.build in the Python bindings still defaults ef_construction to 100, the value the Rust default carried before it moved to 150. That is a real default rather than a doc, so I left it untouched. Should it be lined up with 150? I can fold that into this PR or send it as a separate follow-up, whichever you prefer.

@github-actions github-actions Bot added A-index Vector index, linalg, tokenizer documentation Improvements or additions to documentation labels Aug 2, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve. The stale Rust builder documentation now matches HnswBuildParams::default() and the format specification, with no runtime or compatibility impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-index Vector index, linalg, tokenizer documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant