[SERVER-22404] Extend MatchExpression to support matching Documents Created: 01/Feb/16  Updated: 06/Dec/22  Resolved: 08/Mar/16

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: optimization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-22631 Improve efficiency of matching during... Closed
Assigned Teams:
Query
Backwards Compatibility: Fully Compatible
Participants:

 Description   

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.



 Comments   
Comment by Charlie Swanson [ 08/Mar/16 ]

I accidentally filed two tickets about this, SERVER-22631 better summarizes our options, so I'm closing this as a duplicate.

Generated at Thu Feb 08 04:00:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.