If I wanted to, say, query mongo with something like:
db.someCollection.find({_id: {$in: [1,3,2,4]}})
Could I sort it so that the order it will find/return documents will be in the order listed in the $in
list?
What i'm actually thinking of doing is something like this:
db.someCollection.findOne({someField: 'matches', _id: {$in: [1,3,2,4]}}).sort({_id: [1,3,2,4]})
so that it'll return the first document from that list that matches the query.
Is this possible?