如何按mongoDB中的邻近度和日期排序?我试过这个.但他们只按日期排序:
coll.find({'date':{$gte:date},'location':{$nearSphere:[lat,lng]}}).sort({'date':1}).execFind(function (err, docs) {})
我很感激帮助.
sorting date proximity mongodb
date ×1
mongodb ×1
proximity ×1
sorting ×1