-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Index Maintenance, Querying
-
Query Optimization
-
(copied to CRM)
The 3.1.1 version of partial indexes supports document filters composed using the following query operators:
- $exists (true only)
- $gt, $gte, $lt, $lte
- $eq
- $type
- $and (top-level only)
Users should be able to create partial indexes with more complex expressions for the document filter. We should consider allowing the following:
- $or
- $elemMatch
- $geoWithin
- 'false' as a value for $exists
- multiple levels for $and (simple normalization, unless other logical operators introduced)
- $ne and $not
Support for $in and $regex is being tracked in SERVER-18884.
- is duplicated by
-
SERVER-22194 partialFilterExpression error - Index with pattern {...} already exists with different options
- Closed
-
SERVER-26405 Query planner does not consider $elemMatch criteria to select partial index
- Closed
- is related to
-
SERVER-17858 Partial indexes should support more complex queries
- Closed
- related to
-
SERVER-32540 Make partial index subset analysis consider $elemMatch object a subset of $exists
- Backlog
-
SERVER-18884 Allow $in to be specified in partial index document filter
- Closed