Skip to content

fix(engines): surface the official site for brand/navigational queries#81

Merged
ErikChevalier merged 1 commit into
mainfrom
fix/relevance-navigational
Jun 11, 2026
Merged

fix(engines): surface the official site for brand/navigational queries#81
ErikChevalier merged 1 commit into
mainfrom
fix/relevance-navigational

Conversation

@ErikChevalier

Copy link
Copy Markdown
Contributor

Problem

For a brand typed without its separator (e.g. threejs), the lexical relevance signal scored the official site zero: its title three.js tokenizes to three + js, neither equal to threejs. The demotion-only blend then sank it below single-engine forum posts that contained the literal word.

Fix

  • Separator bridging in the lexical match: adjacent title/snippet tokens are concatenated and stemmed symmetrically, so threejs meets a three.js title.
  • Navigational boost: when the squished query exactly names a result's registrable domain label (threejs → threejs.org), it is lifted to the top past the demotion-only blend. Short-query and exact-match only, so a descriptive query never triggers it. Pure on-device string work; no new requests.

Mirrors the desktop fix (SearchMob-Desktop#87).

Verification

  • New unit tests for bridging, the squish/label/navigational helpers, and an aggregator test that the official site beats literal-match forum posts. ktlint + full unit suite green.

🤖 Generated with Claude Code

The lexical relevance signal scored a result zero when the query was a brand
typed without its separator ("threejs") but the title used the separator
("three.js" -> tokens three + js), demoting the official site below
single-engine forum posts that contained the bare word. Two changes fix it:

- Bridge adjacent tokens in the lexical match so "threejs" meets a "three.js"
  title (concatenations are stemmed symmetrically with the query side).
- Add a bounded, exact-match navigational boost: when the squished query names
  a result's registrable domain label (threejs -> threejs.org), lift it to the
  top past the demotion-only blend. Short-query, exact-match only, so a
  descriptive query never triggers it.

Mirrors the desktop fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ErikChevalier ErikChevalier merged commit dd56949 into main Jun 11, 2026
2 checks passed
@ErikChevalier ErikChevalier deleted the fix/relevance-navigational branch June 11, 2026 01:05
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