Add page-grouped search results with time decay#32
Merged
Conversation
81cc578 to
9f5f4ca
Compare
When multiple blocks from the same non-journal page match a query, they are collapsed into a page group showing the best block's score and block count. Groups expand/collapse on click, with keyboard navigation and Shift+click/Enter to open in sidebar. Ctrl+C on a page group copies a [[page reference]]. Short queries group aggressively (threshold 2); longer queries require more hits (threshold 5) via linear interpolation. Density bonus uses harmonic decay (1/i weighting) to avoid over-promoting pages with a few mediocre matches. Journal pages are never grouped but get bounded exponential time decay to favor recent entries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9f5f4ca to
51e74f2
Compare
Raise grouping threshold (T_MIN 2→4, T_MAX 5→6) and reduce overfetch multiplier (3→2) so pages need more matching blocks before being collapsed into a group. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
[[page reference]], copy button on hover.Test plan
npx vitest run— 74 tests pass (18 new ranking tests)npm run buildsucceeds🤖 Generated with Claude Code