-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Labels:None
-
Query Optimization
Currently find()-style $elemMatch and positional expressions cannot optimize a match expression they're constructed with due to fundamental differences in how expression optimization is done in aggregation and match expressions. So, right now this find()-style expressions expected that they will given an already optimized match expression and so do not try to optimize it.
Once we have match and aggregation expressions combined, we will have a single uniform way of optimizing an expression and the find()-style expressions will need to be modified to optimize the the match expressions whenever their 'optimize()' method is called.