You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: