Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-99965

$geoNear-related $meta fields should be validated when referenced from $facet subpipelines

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: