/repos/search api returns fewer responses than the "Explore" section
The official Gogs v1 /repos/search API seems to be returning fewer responses when compared to the "Explore" section.
For example:
- https://try.gogs.io/api/v1/repos/search?page=28&limit=20 suggests that the gogs instance has only 28 pages (page size = 20) since any page beyond this is empty. This suggests that try.gogs.io has
28 * 20 = 560repos. - But, the "Explore" section goes till page 685! https://try.gogs.io/explore/repos?page=685&q= (page size = 20). This suggests that try.gogs.io has
685 * 20 = 13700repos.
So is there any implicit difference between these routes or is it a bug?
Hi,
I did some experiments to find out the difference between the two endpoints. I created 4 types of repos that are supported by Gogs:
- private
- public (Link)
- unlisted: publically accessible via direct link but not via search or APIs (Link)
- mirror (Link)
https://try.gogs.io/api/v1/repos/search?q=KShivendu&page=1 only returns the public repo and the mirror repo. While the "explore" section shows these along with the "unlisted" repos that the user created.
This seems like the expected behavior. And based on this, the number of visible repos obtained by both the approaches should be the same (excluding the user's own "unlisted" repos).
But then what's causing such a big difference in the number of repos returned by these two endpoints?