-
Notifications
You must be signed in to change notification settings - Fork 72
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
Document aggregation #54
Comments
how to use the aggregate method ? May i know if you are already using aggregation using mongoose |
@chaitu14341 Yes I am using aggregate extensively. The docs are in the source code here https://github.com/mixmaxhq/mongo-cursor-pagination/blob/master/src/aggregate.js#L5 |
No, with mongoose plugin there is only find method. I'm trying to add aggregate() into mongoose plugin but still not working as expected. Update: Actually it works, I've just confused because the aggregate() method of this plugin add the $sort based on _id right after the aggregated results, which make my $geoNear results completely shuffled. Otherwise it works. |
@sangdth, I am not seeing |
Hi @nathanielrindlaub, unfortunately I forgot the context, it's 2020 my friend. But a quick look into the source code, I think you can't use aggregate() if you want to use it as Mongoose's plugin. Mongo and Mongoose are different things. They export separated things in the index.js file, so I believe the last time I had to give up on using this code. |
It looks like the aggregate method isn't documented in readme.md. Not sure if this was intentional or not.
The text was updated successfully, but these errors were encountered: