Database
[{user:"A",Points:22},{user:"B",Points:11},{user:"C",Points:15},{user:"D",Points:7},{user:"E",Points:37}]
Query
db.collection.aggregate([{$facet:{"givenUser":[{$match:{"user":"C"}}],"allUser":[{$sort:{"Points":-1}}],"orderedPoints":[{$sort:{"Points":-1}},{$group:{_id:null,Points:{$push:"$Points"}}},{$unwind:"$Points"}]}},{$project:{allUser:1,currIndex:{$indexOfArray:["$orderedPoints.Points",{$arrayElemAt:["$givenUser.Points",0]}]},beforeIndex:{$add:[{$indexOfArray:["$orderedPoints.Points",{$arrayElemAt:["$givenUser.Points",0]}]},-1]},afterIndex:{$add:[{$indexOfArray:["$orderedPoints.Points",{$arrayElemAt:["$givenUser.Points",0]}]},1]}}},{$project:{result:[{$arrayElemAt:["$allUser",{$cond:{if:{$lt:["$beforeIndex",0]},then:999,else:"$beforeIndex"}}]},{$arrayElemAt:["$allUser","$currIndex"]},{$arrayElemAt:["$allUser","$afterIndex"]}]}}])