Skip to content

Allow inspection of the paged search accessor. - #1364

Merged
Mark Hildebrand (hildebrandmw) merged 2 commits into
mainfrom
mhildebr/paged
Aug 31, 2026
Merged

Allow inspection of the paged search accessor.#1364
Mark Hildebrand (hildebrandmw) merged 2 commits into
mainfrom
mhildebr/paged

Conversation

@hildebrandmw

Copy link
Copy Markdown
Contributor

All the SearchAccessor used during PagedSearch to be inspected.

This allows users of paged search to implement custom pre- and post-page operations including metric reporting.

Copilot AI 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.

Pull request overview

This PR adds a public accessor method to diskann::graph::search::PagedSearch so callers can inspect (and potentially mutate) the underlying SearchAccessor between page fetches, enabling per-page hooks like metric reporting.

Changes:

  • Expose PagedSearch::accessor(&mut self) -> &mut A to access the contained SearchAccessor.
  • Add API documentation explaining the intended use for per-page metric reporting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread diskann/src/graph/search/paged.rs
Comment thread diskann/src/graph/search/paged.rs
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.54%. Comparing base (fabcb9b) to head (a52da46).

Files with missing lines Patch % Lines
diskann/src/graph/search/paged.rs 0.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1364      +/-   ##
==========================================
+ Coverage   91.55%   92.54%   +0.98%     
==========================================
  Files         521      521              
  Lines      100371   100374       +3     
==========================================
+ Hits        91895    92887     +992     
+ Misses       8476     7487     -989     
Flag Coverage Δ
miri 92.54% <0.00%> (+0.98%) ⬆️
unittests 92.50% <0.00%> (+1.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
diskann/src/graph/search/paged.rs 85.00% <0.00%> (-3.32%) ⬇️

... and 46 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hildebrandmw
Mark Hildebrand (hildebrandmw) merged commit 1a70ca3 into main Aug 31, 2026
31 checks passed
@hildebrandmw
Mark Hildebrand (hildebrandmw) deleted the mhildebr/paged branch August 31, 2026 21:17
MustafaIdrisArm pushed a commit to MustafaIdrisArm/DiskANN that referenced this pull request Sep 11, 2026
# Breaking Changes

Flat search visitors are now query-aware (microsoft#1359)
* `flat::FlatIndex`  has been removed. The search entry point is now the
free function `flat::knn_search`, and the `DistancesUnordered` visitor
is constructed per-query rather than reused. The `ElementRef`,
`QueryComputer`, and `QueryComputerError` associated types and the
visitor GAT have also been removed. `DistancesUnordered` now yields
`(id, distance)` pairs directly.

Migration: Callers of the old `FlatIndex`/visitor API should:

1. Drop `FlatIndex` and construct your `DistancesUnordered` visitor
directly for the query being searched.
2. Replace calls into the removed wrapper with `flat::knn_search(&mut
visitor, k, processor, query, &mut output)`.
3. Remove any `ElementRef`/`QueryComputer` implementation, fuse scanning
and distance computation directly in your
`DistancesUnordered::distances_unordered` implementation.

# All Changes

* Make `UnalignedSlice` Send and Sync. by @hildebrandmw in
microsoft#1348
* Bump actions/checkout from 4.4.0 to 7.0.1 in the github-actions group
by @dependabot[bot] in microsoft#1344
* Deduplicate virtual start point edges during disk serialization by
@partychen in microsoft#1350
* Fix alpha pruning documentation by @xinyuwen2 in
microsoft#1351
* Bump the github-actions group with 4 updates by @dependabot[bot] in
microsoft#1356
* Add Neon Inner product u4*u4 kernel by @pfoxARM in
microsoft#1353
* Strengthen arguments to `robust_prune`. by @hildebrandmw in
microsoft#1358
* Allow inspection of the paged search accessor. by @hildebrandmw in
microsoft#1364
* Make flat search visitors query-aware by @partychen in
microsoft#1359
* Add Neon inner-product kernel for USlice<2> with spherical wiring by
@pfoxARM in microsoft#1363

## New Contributors
* @pfoxARM made their first contribution in
microsoft#1353

**Full Changelog**:
microsoft/DiskANN@v0.56.0...v0.57.0

Co-authored-by: Mark Hildebrand <mhildebrand@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants