-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
The special index predicates (geo, text) can be used just once in one filter expression, if it happens that the simplified expression contains more than one of such predicates, the simplified expression is cancelled and the original one is used. We can fix it by factoring the factorizing optimized expressions. E.g. the expression like
{$or: [{a: 1}, {$text: {$search: 'a'}}, {b: 1}, {$text: {$search: 'a'}}, {c: 1}]}
can be factorized to
{$or: [{$and: [{$text: {$search: 'a'}}, {$or: [{a: 1}, {b: 1}]}]}, {c: 1}]}
- split from
-
SERVER-75079 Simplify boolean expressions before feeding them to the optimizer
- Closed