moshikle
moshikle2mo ago

How to handle pagination with AND/OR filter on a value from another table?

Let's say I have the table post,tag,post_tag (join table). I want to support filtering posts by tags, with either an OR/AND filter on the tags. There could be many posts, so we probably need to paginate. I could paginate the post_tag table, but then how would I support a combination of tags without fetching all of the post_tag combinations? There are at least 100k
3 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!
erquhart
erquhart2mo ago
Merging Streams of Convex data
New convex-helpers are available now for fetching streams of documents, merging them together, filtering them them out, and paginating the results. Wi...
moshikle
moshikleOP4w ago
Thank you, seems like the best way indeed.

Did you find this page helpful?