[SERVER-730] re-sort geo $near Created: 10/Mar/10  Updated: 12/Jul/16  Resolved: 10/Mar/10

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 1.3.4

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Comments   
Comment by auto [ 10/Mar/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: allow re-sorting for geo searches SERVER-730
http://github.com/mongodb/mongo/commit/6ecf847f803d5f69e22f5b36121d6a4d18eb5b02

Comment by Nathan Folkman [ 10/Mar/10 ]

Will something like the following ever be supported:

Wed Mar 10 18:03:22 Caught Assertion in runQuery ns:trending.counts massert:can't specify order with geo search
Wed Mar 10 18:03:22 ntoskip:0 ntoreturn:0
Wed Mar 10 18:03:22 query:{ $query: { loc: { $near:

{ 0: 40.7, 1: -73.90000000000001 }

} }, $orderby:

{ total: 1 }

}

So what I'm trying to do is find a bunch of nearby items:

{
"total": 4,
"loc":

{ "lat": 40.5, "long": -79.5 }

}

Sorting the results by "total", or really any other arbitrary field.

Generated at Thu Feb 08 02:54:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.