[SERVER-71729] Add support for geo queries to stitch support library matcher interface Created: 30/Nov/22 Updated: 27/Oct/23 Resolved: 24/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Michael O'Brien | Assignee: | Irina Yatsenko (Inactive) |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | query-director-triage, query-product-scope-1, query-product-urgency-2, query-product-value-1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Integration
|
| Sprint: | QI 2023-05-15 |
| Participants: |
| Description |
|
Currently the "stitch support library" exposes an interface to the server matcher library; given an MQL expression and a BSON document, the matcher can return a true/false match result. However, geo query operators are not supported with this library. Presumably this is because the query plan stage source used to evaluate those operators comes from an (already built) 2d/2dsphere index, and the matcher provided by the library is operating outside of the context of any indexes. But, it would be useful to be able to use the matcher to evaluate geo query operators (geoWithin, geoIntersects, near) on a single document at a time without relying on the existence of an index, mainly to satisfy queries such as:
|
| Comments |
| Comment by Irina Yatsenko (Inactive) [ 24/Apr/23 ] |
|
Confirmed with mikeo@mongodb.com that the current support in matcher for $geoWithin and $geoIntersects is sufficient. |
| Comment by Michael O'Brien [ 01/Dec/22 ] |
|
Actually, if I understand correctly the "does a point lie within radius X of some other point" query could also be satisfied using $geoWithin with $centerSphere, so yes, I think it may still be possible to cover everything here even without $near. |
| Comment by Katya Kamenieva [ 01/Dec/22 ] |
|
It should be possible to make it work for $geoWithin and $geoIntersects. But $near also has sorting component that needs an index. mikeo@mongodb.com would it be enough to only support $geoWithin and $geoIntersects? |