Skip to content

feat(search): restrict search results to the current track (CLI vs core docs) - #1142

Merged
haarchri merged 1 commit into
crossplane:masterfrom
haarchri:feature/cli-core-versions
Aug 26, 2026
Merged

haarchri merged 1 commit into
crossplane:masterfrom
haarchri:feature/cli-core-versions

Conversation

@haarchri

@haarchri haarchri commented Aug 25, 2026

Copy link
Copy Markdown
Member

Since 2.3 the CLI is versioned and released separately from Crossplane core, so the two tracks have diverged (CLI is at v2.5, core at v2.4). The version facet from #1051 can't tell them apart: core v2.4 and CLI v2.4 pages both index as version:2.4, so search results leaked across tracks.

  • Add a track facet filter: CLI pages (/cli/**) filter on track:cli, everything else (core, knowledge base, contributing) on track:core, ANDed with the existing version filter.
  • Fix the "older version" search banner on CLI pages: it compared against the core latest (2.4), so CLI v2.5 pages wrongly showed it. It now uses cliLatest and links to /cli/v2.5/.

Algolia is already configured: the crawler tags records with track, a full recrawl has run, and filterOnly(track) is set on the index.

Check after the Crawl the track field is available:
Screenshot 2026-08-25 at 16 52 54

Check on CLI Page Search:
image

Check that the Track FacetFilter is set during Search:
Screenshot 2026-08-25 at 16 53 59

image

Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for crossplane ready!

Name Link
🔨 Latest commit 23fea8e
🔍 Latest deploy log https://app.netlify.com/projects/crossplane/deploys/6a8dab633b4638000873ce53
😎 Deploy Preview https://deploy-preview-1142--crossplane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93 (🟢 up 1 from production)
Accessibility: 90 (🔴 down 2 from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@haarchri
haarchri requested a review from jbw976 August 25, 2026 16:28

@jbw976 jbw976 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks reasonable, thanks for digging into this issue! go ahead and merge if you're feeling good about your testing.

i do have one question about the behavior i'm seeing on the preview site, and i'm not sure if it'll just start working once we merge, or we still don't have something configured correctly yet:

when searching for trace in the CLI docs area, e.g. on https://deploy-preview-1142--crossplane.netlify.app/cli/latest/command-reference/, no results newer than v2.2 are shown, even though crossplane resource trace is definitely on the newer pages.

Image

is something preventing v2.3+ CLI pages from being indexed?

@haarchri

Copy link
Copy Markdown
Member Author

the command-reference page was too big after crawl > 100KB - so i updated the cralwer - looks now as expected

image

@haarchri
haarchri merged commit 41f9be1 into crossplane:master Aug 26, 2026
6 checks passed
@haarchri
haarchri deleted the feature/cli-core-versions branch August 26, 2026 05:39
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