Zeroday
Zeroday2mo ago

Sorting all my documents

Hi, I want to do a normal query where I have a rank field on all of my documents and I want to return the top 10 documents by rank. Rank is indexed. Am I not able to do this? When I try to do my query I get the "over 8mb" error. Would appreciate some help, thanks!
2 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
lee
lee2mo ago
can you share your query? i would expect it to look like await ctx.db.query("documents").withIndex("by_rank").order("desc").take(10);

Did you find this page helpful?