Details
-
Bug
-
Resolution: Duplicate
-
Minor - P4
-
None
-
3.4.9
-
None
-
ALL
-
-
(copied to CRM)
Description
Consider the following:
db.test.insert({a: {b:2}})
|
db.test.ensureIndex({
|
'a.b': 1 |
}, {
|
name: 'test_index', |
background: true, |
partialFilterExpression: {
|
'a': { $exists: true } |
}
|
})
|
|
|
db.test.find({'a.b': 2}).explain(true) |
Actual:
The index is not used (the first execution stage of the explain(true) result is COLLSCAN
Expected:
The index is used and IXSCAN shows up in the explain(true) results. This seems logic since the query `'a.b': 1` implies `'a':
`.
Attachments
Issue Links
- duplicates
-
SERVER-26580 allow using partial index on query where predicate matches only partial filter expression
-
- Backlog
-