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.
- is related to
-
SERVER-36681 Change {$ne: null} semantics to be more intuitive
-
- Needs Scheduling
-