After migrating my Mongo app to DocumentDB on Azure the $group
queries are no longer working and are throwing the following error:
{ MongoError: '$group' is not supported',
name: 'MongoError',
message: '\'$group\' is not supported',
_t: 'OKMongoResponse',
ok: 0,
code: 115,
errmsg: '\'$group\' is not supported',
'$err': '\'$group\' is not supported' }
Has anyone else encountered this before and may have any suggestions?
There are two ways you can try
(i) You could try to follow documentdb-lumenize
wrote by Larry Maccherone to provide Aggregations (Group-by, Pivot-table, and N-dimensional Cube)
and Time Series Transformations as Stored Procedures in DocumentDB
(ii)Recently this feature is supproted by cosmosdb , you can enable this by Preview features pane and turn on MongoDB aggregation pipleline. Follow the following link,
Aggregation in cosmos-db
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With