Wrong number of pages in Pagination when searching in docs.
Problem to solve
When searching in documentation, the paginator shows a wrong number of pages with results.
For example, when searching for "Introduced in GitLab 16.3" the paginator shows that there are around 100 results, which means there are >= 10 pages of results.
The same number of pages (10) can be seen at the bottom of the page:
In reality the above mentioned search query results in 4 pages of search hits.
Further details
Navigating to any page past 4, say, page 5 by clicking its button, or entering its number directly into the URL in the address bar, results in an error:
https://docs.gitlab.com/search/?q=%22Introduced%20in%20GitLab%2016.3%22&page=5
If one uses the Next button to navigate to the next page of the results, then ,when reaching the last page of the results, in this case number 4, the Next button gets greyed out and its impossible to navigate past it. Moreover, the text about the number of results under the search field on the last page is correct, Showing 31-38 of 38 results .
Issue can be observed for search queries having less than 100 (10 pages) of search hits/results.
Confirmed this behavior in the following browsers on MacOS (Ventura 13.5.1):
Firefox 117.0 (64-bit)
Microsoft Edge Version 116.0.1938.62 (Official build) (arm64)


