Closed thedarkrai07 closed 2 years ago
Does this pass unit tests locally?
Hey @thedarkrai07, thanks for your contribution. I'm closing this one because it was solved by https://github.com/mixmaxhq/mongo-cursor-pagination/pull/323. You can use v7.8.0 now.
Changes Made
Currently, sort and limits are added at the next index of $match. This leads to other operations in the pipeline applied after the limit query giving wrong results. This change ensures that the sort and limit queries are applied in the end.
Ref: Issue #317
Potential Risks
No risks
Test Plan
Change is straightforward. I have also tested it with one of my projects
Checklist