I have the following documents:
{_id : 1, numbers : [-1000, 1000]}
{_id : 2, numbers : [5]}
I'm trying to get a query that will find a document that has a value in the numbers array that is between -10 and 10 (in this case, _id : 2). However, when I try the following:
db.foo.find({numbers : $and : [{$gt : -10},{$lt : 10}]})
it returns all documents. Is this possible to do without map-reduce? Thanks, -JWW
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…