mongo-java-server: Error getting aggregate

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 }

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

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)

@vepo Are you interested in contributing? 😃

aggregate is not yet implemented.