Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
Fully Compatible
-
Query 17 (07/15/16)
Description
CanonicalQuery::normalizeTree performs optimizations by looking for logical equivalencies. For example, an AndMatchExpression with one child is equivalent to just that child; nested NotMatchExpressions cancel out. Currently, it does not optimize a NorMatchExpression node with a single child to be a NotMatchExpression with that same child, an optimization that is useful as a result of SERVER-22833, which caused NotMatchExpression to serialize to a $nor with one child expression.