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

$geoNear does not always match coordinate given to 'near' when maxDistance is set to 0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.5, 4.0.24, 4.2.14
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Minor Change
    • ALL
    • v4.4, v4.2, v4.0, v3.6
    • Hide

      See linked script 'quarters.js' in HELP-20040.

      Show
      See linked script 'quarters.js' in HELP-20040.
    • Query 2020-12-14, Query 2020-12-28, Query 2021-01-11, Query 2021-01-25, Query Execution 2021-02-22, Query Execution 2021-03-08
    • 50

      See the linked script in HELP-20040. Essentially, when performing an aggregation using a $geoNear stage of the form:

      {
      $geoNear: {
      near: { type: "Point", coordinates: <coordinate> },
      maxDistance: 0,
      spherical: true
      }
      

      where 'coordinate' is a lat-long coordinate that exists in some document in the collection being aggregated, the $geoNear stage will not always match the given coordinate.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: