Skip to content
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

Issue with aggregate and $group #58

Open
felixveysseyre opened this issue Jan 11, 2019 · 2 comments
Open

Issue with aggregate and $group #58

felixveysseyre opened this issue Jan 11, 2019 · 2 comments

Comments

@felixveysseyre
Copy link

Hi !

I am not deeply familiar with MongoDB aggregation mechanism but while trying to use the aggregate method implemented by mongo-cursor-pagination, I ran into troubles.

I could be wrong but it seems that the pagination mechanism works by getting one more element than the limit parameter passed by the user, and depending on the number of documents found, can guess if there is another page after. This particular mechanism is broken if you use a $group instruction inside your aggregation pipeline because the number of results is therefore changed.

@soumyabardhan
Copy link

I am also facing similar issues. It doesn't work with $group

@bradvogel
Copy link
Contributor

You're right this doesn't work with $group. Happy to take PRs to update the readme to note this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants