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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -