If I have partial index where partial filter expression is {x:1} it can be used for queries where the only condition is {x:1} (we would scan the entire index but that might be a lot faster than collection scan.
It's currently possible to hint such an index, but it doesn't look like we ever choose or consider it.
Possibly related SERVER-20066
- is duplicated by
-
SERVER-31172 index not used when it has partialFilterExpression and $exists on a query subset
- Closed
- is related to
-
SERVER-23808 Implement Index Choice based on Partial Filter Expression
- Backlog
-
SERVER-28889 Partial index shouldn't do fetch on conditions that are true by the definition of the index
- Closed