Repository navigation
Index hierarchy - #728
Open
MarkWolters wants to merge 119 commits into
Open
Index hierarchy#728MarkWolters wants to merge 119 commits into
MarkWolters wants to merge 119 commits into
Conversation
…c testing programs. Not executable yet.
…ng. Minor dataset updates as well.
…) ASH backend. Validated ASH error and performance correctness.
…d a PQ entropy analysis program.
…hout loading all vectors first). Updated DistancesASH and DistancesPQ to take advantage of this. The original SiftLoader remains intact.
…nto the vector header.
…is a multiple of 64 bits.
…is a multiple of 64 bits.
…SH to acceptt landmark count.
…pooled version for performance purposes though.
…tch and mixed landmarks.
… scoring. Also made a slight change to limit copying query info from query pool (only at landmark run boundaries) during block scoring.
… scoring. Also made a slight change to limit copying query info from query pool (only at landmark run boundaries) during block scoring.
…rainer. Netlib dependencies added.
…vecs loader to SiftLoader.
…ding payload alignment exception for recall benchmarking purposes.
MarkWolters
marked this pull request as ready for review
October 9, 2026 14:46
MarkWolters
requested review from
ashkrisk,
jshook and
tlwillke
as code owners
October 9, 2026 14:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a generic
IndexAPI andHnswIndexBuilder, a fluent builder that makes building, compressing, persisting and searching a graph index a line or two each, instead of hand-assemblingGraphIndexBuilderconstructors, PQ training, writers and score providers. The builder wraps the existingGraphIndexBuildercode, so performance and recall are unchanged;GraphIndexBuilderremains fully supported.Changes
Indexes.hnswBuilder(...): type-first entry point with defaults for every setting;buildAndPopulate()builds a complete graph in one call.withCompressionType(PQ | BQ)trains and encodes inside the builder, with PQ defaults matching Cassandra's and overridable (withPqSubspaces,withPqGlobalCentering,withPqAnisotropicThreshold);getCompressedVectors()returns the codes for search or fused-PQ writing.addGraphNode,markNodeDeleted,cleanup,rescore,withExistingGraph), with early rejection of invalid or mixed-scoring configurations.api.Index/api.IndexSearcher;ImmutableGraphIndexis renamedGraphIndexand implementsIndex.PersistableGraphIndexwriter accessors return each writer's own builder,writeTo(path, vectors)writes a basic on-disk index, andGraphSearcher.search(query, topK, rerankK, vsf, filter)searches with the graph's stored vectors.cleanup(),rescoredropping pending deletes, and writer builders leaking a file handle when not built.HnswRecipe.DEFAULTonly) and IVF types.Breaking changes
ImmutableGraphIndexis renamedGraphIndex(no alias), andGraphIndexBuilder.build(ravv)/getGraph()now returnPersistableGraphIndex. Callers must recompile; seeUPGRADING.md.Testing
main(100k × 128-dim): build time, search latency and recall (exact, inline, fused PQ) are the same within noise.IndexApiExampleexercises every pattern end to end:mvn compile exec:exec@index-api-example.Docs
UPGRADING.md(migration guide) and release notes (docs/release notes/4.0.2/728.enhancement.md).pr728.tar.gz