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

Aggregation pipeline - $min on fields with type string not working #21

Closed
vdininski opened this issue Dec 4, 2015 · 4 comments
Closed

Comments

@vdininski
Copy link

If you try to do a $min aggregation on a string field in a collection you receive Infinity instead of the actual result. I still haven't tried, but I think that $max would work the same way. The issue is that _.min returns Ifinity when using strings.

@vdininski
Copy link
Author

Also $avg returns NaN if there is a document where the field is undefined

@kofrasa
Copy link
Owner

kofrasa commented Dec 7, 2015

I have been working on refactoring the aggregation framework into a library of its own. This will make the core of mingo a bit smaller and provide the extra features on demand. Nonetheless I will get some tests going for these issues soon

@kofrasa
Copy link
Owner

kofrasa commented Dec 7, 2015

I also welcome pull requests. Just rebase changes to one commit and add the corresponding tests

@kofrasa
Copy link
Owner

kofrasa commented Dec 27, 2015

Fixed in release 0.6.3

@kofrasa kofrasa closed this as completed Dec 27, 2015
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

2 participants