Mongodb – Mongo aggregation : Sort by distance at the end of pipeline
I'm making an aggregation and making 3 $lookup in 3 differents collections to get a collection where the location is . The problem is : I cant do a $geoNear after the first stage of the pipeline. So I tried…