redis-om-dotnet icon indicating copy to clipboard operation
redis-om-dotnet copied to clipboard

Can I retrieve matched results count with results when using aggregation sets?

Open imansafari1991 opened this issue 1 year ago • 3 comments

Hi there I want to retrieve the matched results count with results simultaneously to reduce roundtrips when I use pagination in my aggregation query. Is it possible to act in Redis.OM? If I want to say clearly I want the pointed result in the following picture: image

imansafari1991 avatar Apr 21 '23 17:04 imansafari1991

I think you can probably run both a count and your aggregation together asynchronously. Ironically I think the low level results set (which isn't exposed) does capture the count 🤔

slorello89 avatar Apr 26 '23 23:04 slorello89

Yes @slorello89 I ran both as you said, but sometimes our queries (primarily aggregate) are time-consuming, I think about something like PaginatedResult that can expose this count when we have pagination to reduce round trips and prevent calling complex queries two times.

imansafari1991 avatar Apr 27 '23 20:04 imansafari1991

right @imansafari1991 - but if you just run the count reduction in parallel wouldn't that just reply with the count for you?

slorello89 avatar May 02 '23 13:05 slorello89