I'm having an issue with the nin and near filters. Whenever I use them both to query data from my MongoDB, I get an empty set of results.
Here's the code I'm using :
AppUser.find({where : {years_of_experience:{neq : null} ,location: {near: user_location}, id:{nin : swiped_profiles}}, limit:10 },function(err, users){
//SOME CODE
});
If I use only nin it works fine, same goes for near. It's the combination of nin and near that doesn't work !
Instead of using $nin, I would try running with $ne for Not Equals since $nin is used when the field value is not in the specified array or the field does not exist:
Whereas $ne (not equals) would be for a specific value: