-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
Collection-agnostic aggregations that get their documents from a document-generating stage like $documents are sent to the server with aggregate: 1. There is currently no way to do this for a pipeline within a $unionWith stage, which will fail with a parse error if the specified collection is 1.
BSON field '$unionWith.coll' is the wrong type 'int', expected type 'string'
This ticket should enable pipelines like:
{ aggregate: 1, pipeline: [ {$documents: [{a: 1}]}, { $unionWith: { coll: 1, pipeline: [ {$documents: [{a: 2}]}, ] } }, ], cursor: {} }
- duplicates
-
SERVER-58582 Create $documents stage and implement collectionless unionWith
- Closed