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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0, 4.4.5, 4.0.24, 4.2.14
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2, v4.0, v3.6
    • Steps To Reproduce:
      Hide

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

      Show
      See linked script 'quarters.js' in HELP-20040.
    • Sprint:
      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
    • Case:
    • Linked BF Score:
      50

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: