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 100k3 Replies
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!
Check out streams: https://stack.convex.dev/merging-streams-of-convex-data
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...
Thank you, seems like the best way indeed.