-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unusual behavior of 'Count' with 'SORTBY' #502
Comments
Interesting! I think I know what the issue is. Redis OM is correctly creating the command and passing it to Redis, and interpreting the result correctly. But there's a small quirk in
So you'll see when you chop off the reducer from the one that's coming back with 10 results:
That's what's getting passed down the pipeline to the Now if you ran the same query with the MAX parameter set to some value, let's try 100:
You'll see it comes back with all 38 DateTime's sorted, so if you now pass that into the pipeline you'll get your answer:
Now, Redis OM .NET does not at the moment support the ability to add a |
FYI @SMAH1 I spoke with engineering, it is indeed true that the default is 10. |
Thanks for your follow-up. But the solution is not to use This problem occurred to me when I was creating a Query function with its Orderby and then sending it to another function where I control the chunk by adding |
@SMAH1 - I've opened a PR to allow you to set the MAX value, IMO that's the correct path, if a user adds a sortby to the pipeline who are we to say they did not intend to do so. You can just set the MAX to a very high value if you want to give yourself headroom. |
Hi
when I try use Count after Orderby cause return wrong result.
Sample code is:
In sample code also mentions the generated Redis commends. The result is:
The result may be compatible with Redis logic, but not with SQL logic (which users probably expect).
The text was updated successfully, but these errors were encountered: