$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.
- is related to
-
SERVER-13569 sort() after geoNear/geoWithin find/aggregate doesn't use the index
- Closed