Support $documents on shards
The new aggregation operator $documents cannot be used together with $merge in a sharded cluster, you get an error:
db.aggregate([
{
$documents: [
{ _id: ObjectId("6616b08a610fab3e84d2d4ee"), a: 'foo', shardKey: 1 },
]
},
{ $merge: { into: { db: 'myDB', coll: 'sharded_Collection' } } }
])
raises
$documents must run on mongoS, but cannot :: caused by :: $merge must run on a shard
Having this new function available in every environment would we great.
1
vote
Wernfried
shared this idea