Closed JuliusMikkela closed 1 year ago
Use Skip/Take
You mean the IQueryable Skip/Take?
Like this one:
IRedisCollection<T>
.AsQueryable()
.OrderBy(x => x.MyValue)
.Skip(50000)
.Take(10000)
.AsRedisCollection()
.ToListAsync();
Will that actually do the work Redis-side? If so, that's quite neat, and maybe this could be added to the ReadMe to clarify?
You shouldn't need the AsQueryable/AsRedisCollection but yes
Fair enough, in that case I'm all set. Thanks for the quick reply, and happy holidays!
Hi, just getting started with Redis OM, and while I can get most things working as I want I've yet to figure out how to achieve pagination or limit/offset of queried data via Redis instead of relying on Linq of the result. Ideally what I'd like to do is the same effect as specifying "limit x y" would in ft.search, i.e.: "FT.SEARCH idx:myindex * limit 50000 10000"
Is this at all possible, or is the currently intended approach to load the full result into C# and do pagination from there? Feels like a bit of lost performance in making C# do what I assume Redisearch does better?