question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error getting aggregate

See original GitHub issue

Is the command aggregate not implemented?

com.mongodb.MongoCommandException: Command failed with error 59: 'no such cmd: aggregate' on server localhost:27117. The full response is { "$err" : "no such cmd: aggregate", "errmsg" : "no such cmd: aggregate", "code" : 59, "bad cmd" : { "aggregate" : "devices", "pipeline" : [{ "$match" : { } }, { "$project" : { "_id" : 1 } }, { "$group" : { "_id" : null, "ids" : { "$addToSet" : "$_id" } } }], "cursor" : { } }, "ok" : 0 }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
bwaldvogelcommented, Nov 4, 2018

I’ve started to work on an initial version of the aggregation pipeline. It currently supports simple use cases such as matching and grouping with $sum (SumAccumulator), $min (MinAccumulator) and $max (MaxAccumulator) accumulators.

Next steps could be:

  • ~Implement grouping by non-null keys~ done in f9cd8141a4ff6f7bc871580e36085376a785e7ce
  • Implement other pipeline stages such as ~$project~(ecaf59daaece55d1496a84a46e1224f5fdf05eeb), ~$sort~(21864a30172a153d02d14744483b5636293c58a0) or ~$count~(2a0e2d36e97bb8f1c2b734c3b8e2404e900ef4df)
  • Implement other group accumulator operators such as ~$avg~(a34e2b776f99ce5b52294ee8cf9dac5e930a9b17), ~$first~(42f2ccce3074b39517df3d68df46b5cc793f8ac4), ~$last~(42f2ccce3074b39517df3d68df46b5cc793f8ac4) or ~$addToSet~(f7095f453e0a813a4f790aef877fd3b3192e17ea)
2reactions
bwaldvogelcommented, Oct 20, 2018

@vepo Are you interested in contributing? 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

AggregateError - JavaScript - MDN Web Docs
The AggregateError object represents an error when several errors need to be wrapped in a single error. It is thrown when multiple errors...
Read more >
MongoDb aggregate error while getting data - node.js
So you can check bidModel. aggregate part. There is an error but i can not find what is it. I'm not sure about...
Read more >
Invalid Aggregate Error - OutSystems 11 Documentation
Invalid Aggregate Error · The <aggregate> cannot join data from multiple databases. Change it to only use entities from a single database ·...
Read more >
Error aggregate $match $and - Working with Data - MongoDB
I have this error: db.datos_sensores.aggregate([{$project:{ ... In cases like this where you're getting an error from a .aggregate() call, ...
Read more >
'Aggregate query has too many rows for direct assignment ...
This error happens when you're trying to use an aggregate function (like COUNT) on a query that has too many rows. Resolution. To...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found