Accumulator $push not implemented yet. In Cosmos MongoDB

Duy Nguyen (Engineering - Backend) 20 Reputation points

I am using Aggregation in AzureCosmosDB, my collection have many messages and I want to group it by user_id. This is my pipeline:

{"$group": {"_id": "$user_id", "messages": {"$push": "$$ROOT"}}}

But when I ran aggregate, I found an error :

Accumulator $push not implemented yet

I have found the document supported $push accumulator here

So do I use it wrong or I need to call it in another way to use this feature ?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,435 questions
{count} votes

Accepted answer
  1. Sajeetharan 1,566 Reputation points Microsoft Employee

    From the screenshot you've shared, you're trying out Cosmos DB for MongoDB vCore, $push aggregation operator in $group stage is not supported with vCore yet. The above documentation is for Cosmos DB for MongoDB RU

0 additional answers

Sort by: Most helpful