Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Duplicate
-
None
-
None
-
None
-
Ubuntu 16.04.6 with MongoDB 4.0.9
MongoDB Atlas with MongoDB 4.0.10
-
ALL
-
Description
If you have in your collection a document:
{
|
_id: ...,
|
prices : [ {
|
max : 250,
|
min : 200
|
} ]
|
}
|
You can successfully query it by using the following filters:
1)
{'prices.0.min' : 200 }
|
2)
{'prices.0.min' : { $exists : true } }
|
3)
{ 'prices.0.min' : { $gt : 100 } }
|
4)
{ 'prices.0.min' : { $exists : true, $ne : 123 } }
|
BUT you CANNOT do it using the below filters:
1)
{ 'prices.0.min' : { $exists : true, $ne : null } }
|
2)
{ 'prices.0.min' : { $ne : null } }
|
The problem noted is with only `$ne : null` in filter.
Attachments
Issue Links
- duplicates
-
SERVER-36681 Change {$ne: null} semantics to be more intuitive
-
- Backlog
-