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

Reparsing $geoNear $geometry fails when type is not specified in the query.

    • Fully Compatible
    • ALL

      This issue was found in BF-31277. 

      We encountered a reparsing failure during $queryStats, when we have the following find query with $geoNear:

      db.col.find({geo: {$geoNear: {$geometry: {coordinates: [10,10]}}}})
      

      Although most queries with this form specify a "type" in the $geometry operand, it is not enforced nor required. The default behaviour when parsing $geometry objects is to treat the geometry as a point. The serialization for representative shape has to default to using a point type as well to ensure we can re-parse correctly.

       

       

            Assignee:
            santiago.roche@mongodb.com Santiago Roche
            Reporter:
            santiago.roche@mongodb.com Santiago Roche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: