fix(#16): page search results by accessible hits #19

Merged
KofTwentyTwo merged 5 commits from feature/GH-16-search-paging into develop 2026-10-07 00:03:29 +00:00
5 Commits
Author SHA1 Message Date
james.maes 8b1c96166a fix(#16): end paging when a table's scan share runs out
A spent scan budget now ends paging like the result window, so hasMore turns false while the total stays a lower bound.

Refs #16
2026-10-06 18:32:21 -05:00
james.maes 8ec173f66c fix(#16): share the per-table scan budget across tables
Each of T tables now gets an equal share of the scan budget, so one call reads at most max(10,000, T x 2 x limitPerTable) raw hits over max(32, 2T) requests.

Refs #16
2026-10-06 18:22:12 -05:00
james.maes 4b85a77bbe fix(#16): give each table its own scan budget and cap batches
Each locked scan now has its own budget of 10,000 raw hits in batches of at most 1,000, deduplicates hits and pins batches to one shard copy, and reports an exact total once every hit is read.

Refs #16
2026-10-06 18:16:25 -05:00
james.maes 2bc9ac48ae fix(#16): bound the locked search scan per request
One search now shares a budget of 10,000 raw hits and 32 OpenSearch round
trips across every table it scans, so locked-out hits cannot amplify work.

Refs #16
2026-10-06 18:03:23 -05:00
james.maes bb72876f0b fix(#16): page search results by accessible hits
With record locks on, offset now skips accessible results, read in doubling
batches from position 0, and per-table mode honors offset in each table.
Every OpenSearch request keeps from + size within the 10,000 result window.

Closes #16
2026-10-06 17:56:54 -05:00