[SERVER-48649] swap $search with $project to allow combining search with views Created: 08/Jun/20  Updated: 28/Dec/23

Status: Backlog
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Asya Kamsky Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: qi-search
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query Integration
Participants:

 Description   

If someone has a view definition

 [ {$project:{a:0}} ] 

because field a isn't supposed to be views by some users, it currently prevents those users from being able to use any stage that must be first on that view.

As long as $search doesn't try to match a field that's being projected out, it should be able to swap ahead of such projection making this pipeline legal.



 Comments   
Comment by Asya Kamsky [ 08/Jun/20 ]

Same should be the case for $project that only has inclusions, as long as the $search doesn't try to match any fields that aren't available after the projection.

Generated at Thu Feb 08 05:17:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.