-
Type:
Bug
-
Status: Closed
-
Priority:
Major - P3
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Querying
-
Labels:None
-
Backwards Compatibility:Fully Compatible
-
Operating System:ALL
-
Backport Requested:v4.0, v3.6, v3.4, v3.2
-
Sprint:Query 2019-01-28, Query 2019-02-11, Query 2019-02-25
-
Case:
To reproduce:
./mongo
> pipeline = [\{ $match: { 'a': { $elemMatch: {$ne:400 }} }} ]
> db.hello.explain().aggregate(pipeline)
Result looks like:
{
|
"stages" : [
|
{
|
"$cursor" : {
|
"query" : {
|
"a" : {
|
"$elemMatch" : {
|
"$ne" : 400
|
}
|
}
|
},
|
"queryPlanner" : {
|
"plannerVersion" : 1,
|
"namespace" : "test.hello",
|
"indexFilterSet" : false,
|
"parsedQuery" : {
|
"a" : {
|
"$elemMatch" : {
|
"0" : {
|
"" : {
|
"$eq" : 400
|
}
|
}
|
}
|
}
|
},
|
"winningPlan" : {
|
"stage" : "EOF"
|
},
|
"rejectedPlans" : [ ]
|
}
|
}
|
}
|
],
|
"ok" : 1
|
}
|
Note that parsedQuery does not make sense. Namely, it has a key value which is an empty string.
- depends on
-
SERVER-13779 Allow $not to be applied to $regex (currently only /regex/ syntax is allowed)
-
- Closed
-
- is depended on by
-
SERVER-38544 Serialize optimized $match stage instead of original BSON
-
- Open
-
- is related to
-
SERVER-1454 Allow to use $not like $or
-
- Open
-