Sorry this sounds like a silly question but I'm new with mongoDB and I could not find a solution.
I want to get a determinate number (n) of "premium" objects from a collection and another determinate quantity (m) of elements which are no "premium". Both kind of elements are stored in the same collection and they have a boolean field called "premium". They are also geolocated (2d indexed array) and I wanted to get them ordered by distance and then by premium/not premium (in this order of importance).
Don't Know if I am missing something and sorry to disturb.
Thanks in advance.