Repository navigation
perf(core): widen a recall filter once to the maximum window when a pass keeps nothing (#1671) - #1681
Merged
Merged
Conversation
…ass keeps nothing (#1671)
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Nov 4, 2026
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.
What
ResultFilter::fetch: withstrict/min_trustactive, a first pass that keeps no row now widens once, straight to the 1000-candidate window, instead of re-running the strategy at 4x (15, 60, 240, 960, 1000). A query no hit satisfies costs two passes, not five. Partly filled passes still widen in steps. The returned rows and their order are unchanged.run_cycle, shutdown checked between sessions, covered bya_shutdown_stops_the_cycle_between_sessions), so nothing changes there. The CHANGELOG notes it.Why
Off-topic strict queries are the common case for
strictand always paid the worst case. Closes #1671Testing
New tests in
recall_filter.rscount the strategy calls: an empty first pass makes exactly two (15, 1000), a late hit at rank 500 is still found, a partly filled first pass still widens 15 then 60; the existing filter tests pass unchanged.cargo test -p uteke-core -p uteke-server, fmt clean.