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

sort query results by distance to a point

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Geo, Indexing, Querying
    • Labels:
      None

      Description

      Would be nice to be able to sort the results of a geo query according to their distance to another point. Syntax would be something like:
      db.foo.find(...).sort({loc : {$near : [lat,long]}})

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team
              Reporter:
              matulef Kevin Matulef
              Participants:
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: