The array match expressions such as $elemMatch and $size are not properly pushed down to the timeseries system.buckets collection.
I strongly suspect that this is because $elemMatch & $size are array match expressions and splitMatchExpressionBy() function supports only renameable match expressions but the array match expressions are not categorized as "renameable" by hasOnlyRenameableMatchExpressionChildren(). I don't know why splitMatchExpressionBy() supports only renameable match expressions.
Note that $jsonSchema-related internal match expressions are also not categorized as "renameable" and I expect that the same issues exists for $jsonSchema expression(s).
Some of $jsonSchema-related internal match expressions will be supported by SERVER-73535.
- is depended on by
-
SERVER-73535 Add more support for $jsonSchema in 'expression_algo::splitMatchExpressionBy'
- Closed
- related to
-
SERVER-55492 Implement renames for kOther and kArrayMatching MatchExpressions
- Backlog