Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Optimization
Description
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: {}
|
}
|
Attachments
Issue Links
- duplicates
-
SERVER-58582 Create $documents stage and implement collectionless unionWith
-
- Closed
-