-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
ALL
A pipeline like
[{$facet: {pipe: [{$project: {score: {$meta: "geoNearDistance"}}}]}}]
should raise an error alerting the user that the "query requires geoNearDistance metadata but it Is not available" since there is no $geoNear stage to generate the metadata (error code 40218).
This does happen on unsharded collections. On sharded collections, the query succeeds and evaluates the "score" field to missing, but it should raise the error instead.
- is related to
-
SERVER-99596 Refactor how metadata dependencies are validated
- In Code Review