SERVER-50291 introduced the internalQueryEnumerationPreferLockstepOrEnumeration parameter that modifies the order in which the plans are generated for 'contained $or' queries. This turns out to often be helpful in practice as:
- It is often the case that the query shapes are constructed in such a way that using the same index for all of the branches yields the optimal query plan.
- There is a modest limit on how many such plans we will generate (and therefore consider) during query planning.
This new(er) enumeration strategy is currently still off (false) by default.
As there is not much evidence to support the idea that the current strategy is superior to the alternative, and there have been successful uses of the new enumeration strategy to improve query execution, we should update the default to be the new strategy beginning in the next major release. That is to say that internalQueryEnumerationPreferLockstepOrEnumeration should be true by default going forward.