-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Tested with 8.2 & on master.
db.a.drop()
db.a.createIndex({a:1, "b.$**":1, c: 1})
db.a.insertOne({})
db.a.explain().find({a:1, c: 1})
This produces the (sole) plan:
indexBounds: {
a: [ '[1, 1]' ],
'$_path': [ '[MinKey, MaxKey]' ],
c: [ '[MinKey, MaxKey]' ]
}
ie. c is unconstrained.
Similarly
db.a.drop()
db.a.createIndex({a:1, 'b.$**':1, c: 1})
db.a.insertOne({})
db.a.explain().find({a:3, "b.x": {$ne: null}, c: 5})
gives a single plan with an index scan with the following bounds:
{
a: [ '[3, 3]' ],
'$_path': [ '[MinKey, MaxKey]' ],
c: [ '[MinKey, MaxKey]' ]
}
where, c and $_path could both be constrained.
- is related to
-
SERVER-129202 Wildcard indexes produce incomplete explain output due to key collision
-
- Backlog
-
-
SERVER-129049 Wildcard indices scan MinKey even when not needed
-
- Backlog
-
- related to
-
SERVER-128260 Compound Wildcard Index $ne: null on indexed non-wildcard field no longer produces covered plan
-
- Closed
-