modrinth / labrinth

Our Rust-based backend utilizing the actix-web framework to serve Modrinth's API.

Home Page:https://modrinth.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The number of results returned from a search is much greater than the actual number of results.

James103 opened this issue · comments

Describe the bug

The number of results returned from a search is much greater than the actual number of results for almost all searches.
For example, an empty search query for Mods sorted by Recently Updated returns approximately 8,300 for the number of pages of results, when there are actually only a few hundred pages worth of mods.

The following search appears to return 17 as the number of available pages of results, despite there actually only being 3 pages:
https://modrinth.com/mods?q=live&s=updated

Furthermore, going to the next page reduces the number of results returned from the search, until the end of results is reached and the true count is revealed for that query.

Steps to reproduce

  1. Perform any search query.
  2. Notice it appears to return more pages of results than expected.
  3. Navigate to the next page of results.
  4. Notice the number of pages of results appears to go down.

Expected behavior

The number of results returned from a search should roughly match the actual number of results for all searches where feasible, and should remain independent of the page of results the user is browsing to.

This appears to be a regression, as the result count was working as expected as late as December 2023.

Additional context

No response