feat(search): restrict search results to the current track (CLI vs core docs) - #1142
Merged
Merged
Conversation
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
✅ Deploy Preview for crossplane ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
jbw976
approved these changes
Aug 25, 2026
Member
There was a problem hiding this comment.
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.
is something preventing v2.3+ CLI pages from being indexed?
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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
versionfacet from #1051 can't tell them apart: core v2.4 and CLI v2.4 pages both index asversion:2.4, so search results leaked across tracks.trackfacet filter: CLI pages (/cli/**) filter ontrack:cli, everything else (core, knowledge base, contributing) ontrack:core, ANDed with the existing version filter.latest(2.4), so CLI v2.5 pages wrongly showed it. It now usescliLatestand links to/cli/v2.5/.Algolia is already configured: the crawler tags records with
track, a full recrawl has run, andfilterOnly(track)is set on the index.Check after the Crawl the track field is available:

Check on CLI Page Search:

Check that the Track FacetFilter is set during Search:
