Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
Query Optimization
-
(copied to CRM)
Description
When trying to use a $lookup with pipeline and a $geoNear stage, there is no way to pass an argument in the let field into the $geoNear stage.
e.g.
{
|
"$lookup" : { |
"from" : "regions", |
"let" : { |
"point" : "$location" |
},
|
"pipeline" : [ |
{
|
"$geoNear" : { |
"spherical" : true, |
"maxDistance" : 10000.0, |
"distanceField" : "distance", |
"uniqueDocs" : true, |
"near" : "$$point" |
}
|
}
|
],
|
"as" : "regions" |
}
|
}
|
Attachments
Issue Links
- duplicates
-
SERVER-58604 Allow $geoNear 'near' argument to be a let variable
-
- Closed
-
- is duplicated by
-
SERVER-54105 $geoNear in $lookup with dynamic coordinates from "parent" collection
-
- Closed
-
-
SERVER-67149 $geoNear in $lookup with dynamic coordinates from "parent" collection
-
- Closed
-
- is related to
-
SERVER-47218 Geo-spatial $lookup
-
- Closed
-
-
SERVER-37675 Allow $geoWithin and $geoIntersects to take their geometry from an expression
-
- Backlog
-
-
SERVER-38198 Remove the requirement that $geoNear needs to be in the first stage of the pipeline
-
- Closed
-
- related to
-
SERVER-9606 $cond operator should allow $match as a boolean expression
-
- Backlog
-
-
SERVER-49953 allow $expr as RHS expression in regular match expressions
-
- Closed
-