erquhart
erquhart17mo ago

Filtered paginated queries

I'm trying to hack together a homegrown fuzzy search until it's available in Convex core. I'm thinking of having a paginated query that gets a page, filters it down (potentially to 0 length), and then recursively calls itself until a certain number of results are collected before returning. In theory this should work fine as the client is only receiving a cursor and result set, but wanted to ask if this is not recommended for any reason.
3 Replies
erquhart
erquhartOP17mo ago
If this is valid (albeit ineffecient, I concede), I can scrap together a poor man's fuzzy/multi-field search
lee
lee17mo ago
sounds good to me! this is how our row-level-security library works actually you may have an issue with calling multiple paginated queries in the same convex function. what i would recommend is doing the loop / recursion from the client
erquhart
erquhartOP17mo ago
So just regular pagination, but with filtering in the query that makes sense

Did you find this page helpful?