-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
Query Execution
-
Major Change
{$ne: null} has some counterintuitive behavior which has hurt us several times now:
db.c.insert({a: [1, {c: 1}]}); db.c.insert({a: [1]}); db.c.find({"a.b": {$exists: true}}) // Returns nothing. db.c.find({"a.b": {$ne: null}}) // Returns {a: [1]} !!!!
That is, {$ne: null} doesn't necessarily return a subset of the things that {$exists: true} returns. This ticket is to track the work of changing the meaning of {$ne: null}.
- is duplicated by
-
SERVER-42464 Find query fails with filter on field of a hash *in specified array element*
- Closed
- is related to
-
SERVER-36635 Inconsistent query results with and without presence of partial indexes
- Backlog
-
SERVER-67506 [CQF] Dotted path equality to null incorrectly matches non-object array elements
- Open
-
SERVER-36465 Non-multikey sparse indexes can be used to answer query with {$ne:null} predicate
- Closed
- related to
-
SERVER-31876 $ne has inconsistent behavior
- Closed