-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
QE 2023-04-03
-
135
There is a false assumption that there's no need to expand a CWI if its wildcard component has been expanded to some specific field.
Imagine we have a $or query: { $or: [\{a: {$gt: 10}}, \{"sub.a": {$gt: 5}}]} and a CWI {a: 1, "sub.$**": 1}. The current expanding logic only expands the CWI to an IndexEntry with {a: 1, "sub.a": 1} because "sub.a" is relevant to this CWI. However, the first predicate of the $or - {a: {$gt: 10}} should actually be answered by an expanded IndexEnty w/o specific expanded field, because these two expanded IndexEntrys generate IndexBounds.