final documents = await databases.listDocuments(
databaseId: AppwriteClientHelper.databaseId,
collectionId: AppwriteClientHelper.vocabularyCollectionId,
queries: [
Query.select([]),
Query.equal("language", languageSelected.languageId),
// Query.limit(10),
Query.orderDesc("\$updatedAt")
]);
I have a 39 total documents in my collection. Now, when I fetch all the documents why only it gives me 25 documents? as you can see in my code I already commented out the Query.limit
,
The default limit is 25
Then how can I fetch all the list of my documents? without limiting?
is it okay to set the limit to 1000 Query.limit(1000)
because I am going to create a script to export all documetns
Max limit is 100
I really recommend cursor-based pagination with a limit of 100 or so...but, technically, we have removed the max limit, so you can pass a really big number for limit if you really wanted to
Appwrite now allows a larger limit in the query? I've been doing while loop with a flag called "isMore" and check the return docs (if it reaches 100) and then querying again with offset going up
How much can you query now?
as high as you want...but i recommend sticking with your previous implementation
Ok
Just to complement your answer take a look this article about pagination, the benchmarks are really interesting
https://itnext.io/the-best-database-pagination-technique-is-530abf2aab51
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.
- Current User is Not authorized
recreating same Thread