Details
Description
The $type query predicate should not support type code 0, as this is used internally for the "missing" or "EOO" BSON type. The system should reject an attempt to use $type:0 with a clear error message. Instead, when an index is available for use by the $type predicate, the server returns an internal error message such as the following:
{
|
"ok" : 0,
|
"errmsg" : "type not supported for appendMinElementForType",
|
"code" : 10061,
|
"codeName" : "Location10061"
|
}
|
Users who wish to check for existence of a field should instead use $exists:false.
Attachments
Issue Links
- is documented by
-
DOCS-11803 Docs for SERVER-35454: Query system does not fail cleanly for $type:0 when an index is available
-
- Closed
-
- is related to
-
SERVER-8196 $type value should be signed extended
-
- Closed
-