I have the following documents:
{_id : 1, numbers : [-1000, 1000]} {_id : 2, numbers : [5]}
I am trying to get a query that will find a document that has a value in an array of numbers that is between -10 and 10 (in this case, _id: 2). However, when I try to do the following:
db.foo.find({numbers : $and : [{$gt : -10},{$lt : 10}]})
he returns all the documents. Is it possible to do without reducing the map? Thanks, -JWW
Jwally
source share