Reputation: 11
Im using the drive api for python. We have this feature wherein the user is allowed to search for files inside the drive. We used the following parameters for the api. maxResults = 20 and q
q = 'mimeType!="application/vnd.google-apps.folder" and fullText contains "%s" '
The query returned 3 pages. Page 1 - 20 results, Page 2 - 10 results, Page 3 - 4 results.
Is it really the behavior of the api? Or is it possible to have equal results per page?
Thank you.
Upvotes: 0
Views: 204
Reputation: 19835
that has been, unfortunately, how the api has behaved since years ago.
the api applies some filters before (using their indexes and respecting page size) and some others (not supported by their indexes) after it has gotten results (the 20 elements page).
Ive even seen cases where the page is empty but still has a "next page" you need to keep getting.
Its a pain if you want to show an actual pagination to the user, or if you have time constrains as sometimes you need to get many pages just to get a few items, making the query very inneficient.
Upvotes: 1