[SERVER-63816] Extend non-correlated pipeline prefix caching optimization to $search in $lookup stage Created: 18/Feb/22  Updated: 06/Feb/24  Resolved: 06/Feb/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 8.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Ruslan Abdulkhalikov (Inactive) Assignee: Erin Zhu
Resolution: Fixed Votes: 0
Labels: query-product-scope-1, query-product-urgency-3, query-product-value-2, query-skunkworks
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-78327 Make $lookup cache $search results Closed
Related
is related to SERVER-60800 Allow $search in $lookup/$unionWith Closed
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Participants:

 Description   

$search is called multiple times during $lookup pipeline execution, must be some issues with cache

related to SERVER-60800



 Comments   
Comment by Githook User [ 06/Feb/24 ]

Author:

{'name': 'erinzhu001', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}

Message: SERVER-63816 Enables caching optimization to $search in $lookup (#18396)

GitOrigin-RevId: c08d26d01b364295b871dc5f5537b7666fef6013
Branch: master
https://github.com/mongodb/mongo/commit/3d66fc28dca302cfa5c1862646f2f50e058aa88d

Comment by David Storch [ 18/Feb/22 ]

The $search stage itself is always non-correlated because there is no way to refer to a correlated let variable in the $search stage. Therefore, I think the caching optimization with DocumentSourceSequentialDocumentCache could help performance quite a bit if the search results fit within the 100MB cache size limit.

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