Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
Ubuntu15.04, Mozilla firefox.
*Location*: https://docs.mongodb.com/v3.0/reference/operator/query/elemMatch/#op._S_elemMatch
*User-Agent*: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
*Referrer*: https://docs.mongodb.com/v3.0/reference/operator/update/pull/
*Screen Resolution*: 1920 x 1080
Ubuntu15.04, Mozilla firefox. *Location*: https://docs.mongodb.com/v3.0/reference/operator/query/elemMatch/#op._S_elemMatch *User-Agent*: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 *Referrer*: https://docs.mongodb.com/v3.0/reference/operator/update/pull/ *Screen Resolution*: 1920 x 1080
Description
Element Match: documentation issue (show wrong result)
Given the following documents in the scores collection:
{ _id: 1, results: [ 82, 85, 88 ] } { _id: 2, results: [ 75, 88, 89 ] }db.scores.find(
{ results: { $elemMatch:
} }
)
The query returns the following document since the element 82 is both greater than or equal to 80 and is less than 85
Results:(Wrong results here)
{ "_id" : 1, "results" : [ 82, 85, 88 ] }