-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code, Querying
-
Fully Compatible
-
Query 17 (07/15/16)
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
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.