Every clause of the OR-query must match a subset of the documents matched by the partial index filter. For example, an index with key pattern {a: 1} and partial index document filter {x: {$exists: true}} should be able to answer all of the following queries:
find({a: 1, $or: [{x: 1}, {x: 2}]}) find({a: 1, $or: [{x: {$gt: 10}}, {x: {$lt: 5}}]})
- related to
-
SERVER-104089 Inefficient Index Scans for $or Queries Using Partial Indices
-
- Needs Verification
-