SERVER-86194ClosedFixed

Improve MatchExpression $or->$in rewrite to handle multiple fields

Currently the MatchExpression $or->$in rewrite is only capable of collapsing a single field with multiple equality disjunctions into a $in. For example,   is optimized to       This leads to an SBE plan with a large number of unnecessary comparisons. SBE is able to evaluate $in predicates more efficiently by using a hashset, and the interval builder is able to generate index bounds more easily on an $in list. These expressions can be further reduce by allowing the $or->$in r

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
8.0.0-rc0
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
auto-reverted