Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
Description
A query can be created to scan for a non existent key that starts with a $.
These fields are not permitted to be inserted, but can still be queried on. This leads to a collection scan, which can have many performance impacts.
If the $ character denotes an operator (like $inc, $date etc) then when some unknown operator is found, it should be rejected by the query rather than cause a collection scan. In this way queries like
db.test.find({$keyname:1})
|
would fail.