Skip to content

fix: rank word-start matches higher for autocomplete - #1318

Merged
ocavue merged 1 commit into
fix/link-usage-rankingfrom
fix/word-start-match-rank
Sep 18, 2026
Merged

ocavue merged 1 commit into
fix/link-usage-rankingfrom
fix/word-start-match-rank

Conversation

@ocavue

@ocavue ocavue commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

A query that starts any word of a title (smith in John Smith) now ranks like a title prefix, above a mid-word match such as Blacksmithing. Stacked on #1317.

Summary by CodeRabbit

  • Improvements

    • Search suggestions now rank exact matches first.
    • Matches beginning at word boundaries—such as after spaces or punctuation—appear ahead of matches found in the middle of words.
    • This produces more relevant suggestion ordering for multi-word and punctuated queries.
  • Tests

    • Added coverage for word-start, later-word, punctuation, and mid-word matching scenarios.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 10894cce-260a-4aec-b64c-a619b2658cf7

📥 Commits

Reviewing files that changed from the base of the PR and between dd9ea20 and c205ee3.

📒 Files selected for processing (2)
  • packages/core/src/indexing/suggest.test.ts
  • packages/core/src/indexing/suggest.ts
 __________________________________
< I void warranties and segfaults. >
 ----------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@ocavue
ocavue added this pull request to stack #1319 September 18, 2026 16:47
@ocavue ocavue changed the title fix(autocomplete): rank a match at a word start above a mid-word match fix: rank word-start matches higher for autocomplete Sep 18, 2026
@ocavue
ocavue marked this pull request as ready for review September 18, 2026 16:51
@ocavue
ocavue merged commit 0bc1969 into master Sep 18, 2026
14 of 15 checks passed
@ocavue
ocavue deleted the fix/word-start-match-rank branch September 18, 2026 16:51
This was referenced Sep 18, 2026
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.

1 participant