英文:
Appwrite Random list of Documents
问题
我目前正在开发Appwrite,作为我的工作的一部分,我遇到了一个问题。我想随机检索文档。这是否可能?谢谢。
我尝试使用限制和偏移来实现,但未成功。
英文:
I am currently working on Appwrite, and as part of my work, I am facing an issue. I would like to retrieve documents randomly. Is it possible to achieve that? Thank you.
I was trying through the use of limit and offset.
but not work
答案1
得分: 0
这是不可能的,除非您使用特定ID的筛选器进行查询,然后您需要知道每个ID,或者查询它们所有(通过分页循环进行总数计算),然后从您构建的列表中随机选择。
英文:
This is not possible, unless you were to query using filters for specific ids, then you would need to know every id, or query for them all (looping through pagination for totals) then picking random from the list you built.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论