Initially I wanted to support mongo db text search with geo $near
functionality. Later realized that these two cannot be used together as both require indexes.
Later I've decided to use $geoWithin
instead. However, the results are not sorted by distance like $near
does.
I would like to know if there is any way to sort the results returned by $geoWithin
by 'distance'?