Fix versioned search redirect for versions 15.11+
What does this MR do and why?
Fixes behavior on the "Search the archives" dropdown on the search results page. We need to set the query parameter on the redirect URL based on the version because the string changed from query
to q
in 15.11.
- Before 15.11, we use links like this: https://archives.docs.gitlab.com/15.8/search/?query=git
- In 15.11, we need a link like this: https://archives.docs.gitlab.com/15.8/search/?q=git
- And in 16.0+, either works, but
q
is the default.
Closes #1685 (closed)
Screenshots, screen recordings, or links to review app
Review app: https://gps-version-query-param.docs.gitlab-review.app/search/?q=git&page=1
How validate
- Visit the review app search result page: https://gps-version-query-param.docs.gitlab-review.app/search/?q=git&page=1
- Use the "Search the archives" dropdown to run the search on Archive sites
- The archive search page should run a search for your query when the page loads.
Verify this works for 15.11 and a few different prior versions.
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Sarah German