-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Internal Code
-
Query
-
Fully Compatible
A Document and a BSONObj logically represent the same thing, but the aggregation framework works with Documents instead of BSONObjs, since the former are cheaper to manipulate. A MatchExpression (used in the $match stage) only accepts a BSONObj, via matchesBSON. This means that for the $match stage, we have to convert a Document to a BSONObj to determine if it matches. We should extend the MatchExpression class to be able to match a Document so we can avoid this potentially expensive conversion.
- duplicates
-
SERVER-22631 Improve efficiency of matching during an aggregation pipeline.
- Closed