bazelbuild / bazelbuild/bazel

Bug: bazel.build's doc search doesn't scope to the currently selected bazel version

Open
#27,468 1 comment 0 reactions 0 assignees View on GitHub
P2 team-Documentation team-OSS type: documentation (cleanup)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Page link:

_No response_

### Problem description (include actual vs expected text, if applicable):

Example:
- visit a page and click an older version, e.g. https://bazel.build/versions/7.6.0/docs/user-manual is the user manual for version 7.6.0
- I want to actually search for something not on this page, say repository_ctx. so I click the search box and type that in. That takes me to https://bazel.build/s/results?q=repository_ctx
- I click the top result as it's the right doc! but it's not - https://bazel.build/rules/lib/builtins/repository_ctx is the page for the LATEST version, not 7.6.0.

Expected result: I end up on https://bazel.build/versions/7.6.0/rules/lib/builtins/repository_ctx. The search box should preserve the currently selected version.

### Where do you see this issue? (include link to specific section of the page, if applicable)

every page on the website with the search box and a version selector

### Any other information you'd like to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue from https://bazel.build/versions/7.6.0/docs/user-manual by searching for repository_ctx, then compare the result URL with the selected version. Start at the website's search box and version selector behavior. Done means a search from a versioned page leads to the matching /versions/7.6.0/ result rather than the latest-version page.

Written by the indexing model from the issue text.

Assessment

Domain
search, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.