Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3338

Improve $near and geoNear pages to mention additional sort is not efficient

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • v1.3.7
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      $near and the geoNear command sort the documents by distance, nearest to furthest. Adding an additional sort() to the query requires to sort in memory.

      We should make it clearer on both pages that if the user does not require the documents in order of distance, they should use a $geoWithin instead.

            Assignee:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Reporter:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              10 years, 1 day ago