Skip to content

Strip routed framework/version tokens from the search query text#398

Merged
eugenia-scandit merged 1 commit into
mainfrom
strip-routed-tokens-from-query
Jul 17, 2026
Merged

Strip routed framework/version tokens from the search query text#398
eugenia-scandit merged 1 commit into
mainfrom
strip-routed-tokens-from-query

Conversation

@eugenia-scandit

Copy link
Copy Markdown
Collaborator

When a query names a framework/version, we route on it (framework filter in transformItems, version facet rewrite) but previously left the token in the query text sent to Algolia. That platform word skewed textual relevance - e.g. "barcode capture flutter" lifted /sdks/flutter/agent-skills/ (which lists frameworks) above /sdks/flutter/barcode-capture/get-started/.

Strip the detected framework tokens (and the version marker when it routes) from the query text only. Routing is unchanged - it's still derived from the original query (latestQueryRef and versionTagInQuery both read the original); only the text Algolia scores against differs, so the product's main guide surfaces instead of a framework-listing page. Keep the original query if the strip would empty it (e.g. a lone "ios").

Verified before/after on the framework/version query set: get-started and product intro pages now rank first where framework-listing / release-notes pages did before.

When a query names a framework/version, we route on it (framework filter in
transformItems, version facet rewrite) but previously left the token in the
query text sent to Algolia. That platform word skewed textual relevance -
e.g. "barcode capture flutter" lifted /sdks/flutter/agent-skills/ (which lists
frameworks) above /sdks/flutter/barcode-capture/get-started/.

Strip the detected framework tokens (and the version marker when it routes)
from the query text only. Routing is unchanged - it's still derived from the
original query (latestQueryRef and versionTagInQuery both read the original);
only the text Algolia scores against differs, so the product's main guide
surfaces instead of a framework-listing page. Keep the original query if the
strip would empty it (e.g. a lone "ios").

Verified before/after on the framework/version query set: get-started and
product intro pages now rank first where framework-listing / release-notes
pages did before.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eugenia-scandit
eugenia-scandit merged commit cf53275 into main Jul 17, 2026
2 checks passed
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.

2 participants