-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: 3.2.0-rc1
-
Component/s: Aggregation Framework, Internal Code
-
Labels:
-
Query
A $match clause run with $text must be in the first position of an aggregation pipeline. Our current handling for this has DocumentSource::isValidInitialSource() returning false (which is not logically correct when $text is present) paired with a uassert in DocumentSource::setSource to enforce. We should change the way this is handled so that the DocumentSourceMatch interface reports correct information and so that pipeline position validation can be handled externally.