[SERVER-58359] More flexible query containment for $geoWithin Created: 07/Jul/21 Updated: 29/Oct/23 Resolved: 28/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | Maddie Zechar |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Query Optimization 2021-07-26, Query Optimization 2021-08-09 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 127 | ||||||||||||||||||||||||
| Description |
|
When considering whether a $geoWithin partial index can be used to satisfy a query, currently we treat the $geoWithin opaquely, so only queries that explicitly mention that region can use the index. For example,
The third query should be indexed, because nyc is geometrically contained in usa. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 28/Jul/21 ] |
|
Author: {'name': 'Maddie Zechar', 'email': 'mez2113@columbia.edu', 'username': 'madelinezec'}Message: |
| Comment by David Percy [ 08/Jul/21 ] |
|
We should be able to use the implementation of $geoWithin, to check whether one region contains another. It eventually calls a library (S2), but there may be other checks that happen first. We can start by looking at GeoMatchExpression::matchesSingleElement. |