-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Running the following on the legacy mongo shell vs mongosh produces different outputs:
db.a.drop()
db.a.createIndex({a:1, "b.$**":1, c: 1})
db.a.insertOne({})
db.a.explain().find({a:1, c: 1}).finish().queryPlanner.winningPlan.inputStage.indexBounds
On mongosh:
{
a: [ '[1, 1]' ],
'$_path': [ '[MinKey, MaxKey]' ],
c: [ '[MinKey, MaxKey]' ]
}
On the legacy mongo shell:
{
"a" : [
"[1.0, 1.0]"
],
"$_path" : [
"[MinKey, MinKey]",
"[\"\", {})"
],
"c" : [
"[MinKey, MaxKey]"
]
}
Neither is actually correct. The object really contains two $_path keys, and the legacy shell shows the first occurance, while mongosh shows the second. This is confusing and misleading.
- related to
-
SERVER-128260 Compound Wildcard Index $ne: null on indexed non-wildcard field no longer produces covered plan
-
- Closed
-
-
SERVER-128773 Wildcard indices do not produce skip scans
-
- Backlog
-
-
SERVER-129049 Wildcard indices scan MinKey even when not needed
-
- Backlog
-