is there a way to sort the documents returned from limit? example:
//returns 10 documents:
db.users.find()
.sort({last_online_timestamp:-1})
.limit(10)
//returns 10 another documents
db.users.find()
.sort({last_online_timestamp:-1})
.limit(10)
.sort({messages_count:1});
what I want is to get 10 last logged in users and then sort them by messages count.