[SERVER-37675] Allow $geoWithin and $geoIntersects to take their geometry from an expression Created: 19/Oct/18 Updated: 28/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Robert Ludwig | Assignee: | Backlog - Query Integration |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | geo, qi-geo, query-product-scope-2, query-product-urgency-3, query-product-value-2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Integration
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Suppose I have collections for users, and coffeeshops with geodata for each. I'd like to make a pipeline counting the number of coffeeshops a user is near. A natural way to do this is with $lookup and a subpipeline:
However, this approach is currently impossible. $geometry does not resolve the variable defined in the $let expression, and instead rejects the Point Assert: command failed: {"ok" : 0,"errmsg" : "Point must only contain numeric elements", "code" : 2, "codeName" : "BadValue"}: aggregate failed
This is a big limitation! Why can't I make a $geometry from some other object?
|
| Comments |
| Comment by David Percy [ 16/Nov/22 ] |
|
Reopening because This ticket is specifically about allowing geo match-expressions ($geoWithin, $geoIntersects) to take their geometry (which can be a polygon, or other shape) from an expression.
|
| Comment by Danny Hatcher (Inactive) [ 22/Oct/18 ] |
|
Hello Robert, Unfortunately, this is a known issue. All work towards resolving it should occur in |