Saturday 6 May 2017

mongoDb query to search values using $in and $or?

var norm = [ 'may', 'funny', 'top funny', 'dinner', 'dog', 'hello', 'flo', 'sake', 'hai', 'video', 'rhymes', 'fine', 'good', 'public', 'testing', 'irish', 'hii', 'babies', 'coffee', 'happy', 'working', 'comedy', 'india', 'best', 'top', 'feelings', 'krishna', 'test' ]

schema.find( { $or: [ {"head":{"$in":norm}}, {"key":{"$in":norm}} ],"privacy":{"$ne":"Private"} },function(err,res){});

i have to list the result in ascending order as per the norm but i didnt get the exact result from the above query.



via Jagadeesh

No comments:

Post a Comment