Skip to content

fix(rank): keep the official site on page one for known-item searches#87

Merged
ErikChevalier merged 1 commit into
mainfrom
fix/navigational-result-ranking
Jun 19, 2026
Merged

fix(rank): keep the official site on page one for known-item searches#87
ErikChevalier merged 1 commit into
mainfrom
fix/navigational-result-ranking

Conversation

@ErikChevalier

Copy link
Copy Markdown
Contributor

Problem

Searching a brand or product name returned the official site buried below encyclopedia/forum pages, or off the first screen, even though the metasearch aggregator ranked it first. This is a precision@1 placement problem in the re-rank layers, not a recall problem. Ports the desktop fix (SearchMob-Desktop#92).

Two root causes, both fixed

1. ResultSorter flattened relevance into list position. The default fresh+relevant sort re-derived a flat 1/(60+index) from rank position, discarding each result's real score (lexical blend + navigational boost), so a single dated result could leapfrog an undated official homepage. AggregatedResult now stores its final blended+nav score and ResultSorter scales that (new relevanceOf accessor), so recency only reorders results of comparable relevance and never overtakes a strong match.

2. The AI-slop blocklist had high-value false positives, on by default. The bundled blocklist is bulk-merged from community browser "hide AI" lists that include the official sites of AI companies and major developer hubs — github.com, huggingface.co, openai.com, and more. With the filter defaulting to downrank, those sites were pushed off page one. A curated allowlist (assets/blocklist/allowlist.txt) is now subtracted from the effective blocklist on load (subdomains too), via AiSlopBlocklist.effectiveBlocklist.

Verification

  • New regression tests for both fixes; full unit suite + ktlint green on the local toolchain.

Notes

  • Research-backed follow-ups (PSL + urlmr graded navigational boost, BM25F title>snippet field weighting, registrable-domain dedup, trust-weighted RRF) are queued separately and mirror the desktop plan.

🤖 Generated with Claude Code

Ports the desktop fix. Two re-rank layers could bury a navigational result
(the official site of the searched name) below encyclopedia/forum pages even
though the aggregator ranked it first. Both fixed on-device with no new requests.

1. ResultSorter flattened relevance into list position. The default
   fresh+relevant sort re-derived a flat 1/(60+index) from rank position,
   discarding each result's real score (lexical blend + navigational boost),
   so a single dated result could leapfrog an undated official homepage.
   Aggregator now stores its final blended+nav score on AggregatedResult and
   ResultSorter scales THAT (relevanceOf accessor), so recency only reorders
   results of comparable relevance and never overtakes a strong match.

2. AI-slop blocklist false positives. The bundled blocklist is merged from
   community "hide AI" browser lists that include the official sites of AI
   companies and major developer hubs (github.com, huggingface.co, openai.com,
   and more). With the filter on by default those sites were downranked off the
   first screen. A curated allowlist (assets/blocklist/allowlist.txt) is now
   subtracted from the effective blocklist on load, including subdomains, via
   AiSlopBlocklist.effectiveBlocklist.

Regression tests added for both. Unit suite and ktlint green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ErikChevalier ErikChevalier force-pushed the fix/navigational-result-ranking branch from 9223b22 to afe1d7a Compare June 19, 2026 06:45
@ErikChevalier ErikChevalier merged commit df134dc into main Jun 19, 2026
2 checks passed
@ErikChevalier ErikChevalier deleted the fix/navigational-result-ranking branch June 19, 2026 06:51
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