aggregation framework - MongoDB Sorting on GeoNear Results -


i'm trying sort values in collection "vehicle" text field "condition", although seems sorting having no effect on result set. believe syntax correct, cause of problem?

db.vehicle.aggregate([ {    $geonear: {        near:[26.243640,-80.265397],        maxdistance: 2500/111.12,        query: { isactive: true, condition: {$in: ['new','used']} },        distancefield: "distance",        limit: 10    } }, {     $project: {condition: 1, distance: 1} }, {      $sort: {condition: -1}  } ]) 


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -