Open crazyscientist opened 4 years ago
It's not so magical, it's the number of matches divided by 100. It's true that for such simple searches this internal limitation should not matter. I'll try to fix this.
Do you really want pagination when doing such searches? You can specify limit=0 to get all matches.
Ok, hitting this limit has to do with the search order it returns. I'll talk with Adrian to find out if we can change this to something more sane.
I added a workaround. The sorting order needs to be discussed anyway ;)
Do you really want pagination when doing such searches?
Usually I like using pagination as it reduces the time for processing single pages. Having done a small benchmark, I noticed that the time to process one request does not depend does not depend too strongly on the limit
value.
So, this is really more like a cosmetic consistency issue.
On Donnerstag, 30. April 2020, 09:19:51 CEST wrote Andreas Hasenkopf:
Do you really want pagination when doing such searches?
Usually I like using pagination as it reduces the time for processing single pages. Having done a small benchmark, I noticed that the time to process one request does not depend does not depend too strongly on the
limit
value.So, this is really more like a cosmetic consistency issue.
Can we help you to make your request more efficient?
Usually this interface is used to find a specific item. It is not used for tracking entire content, we have different mechanics for that.
--
Adrian Schroeter email: adrian@suse.de
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
Can we help you to make your request more efficient?
@adrianschroeter I'm certainly open for suggestions
Issue Description
The API endpoints
/search/project/id
,/search/package/id
and/search/released/binary/id
show a consistent pagination behavior controlled by the parameters
limit
andoffset
. If these parameters are not given, all results are returned.The API endpoint
/search/published/binary/id
does not work this way:offset
seems to be ignoredlimit
is specified and above a magical value.Working examples
The results look like this:
Expected Result
The API endpoint
/search/published/binary/id
obeys the parameterslimit
andoffset
as the other API endpoints mentioned above.How to Reproduce
Error 413
Query any of the following API URLs.
Everyone will return:
Magic limit of
limit
Use same query as above, but increase until API does no return error 413 any more.
This will lead to a magical value of 1065 at which the API is finally returning results.
Further Information