[SERVER-78045] Nested $or queries with $text nodes should use the $or with clustered collection scan Created: 13/Jun/23  Updated: 26/Dec/23

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

Type: Bug Priority: Major - P3
Reporter: Gil Alon Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: qi-text-search
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-61259 $or queries with text indexes fail on... Closed
is related to SERVER-77280 $or queries only produce collscan for... Closed
Assigned Teams:
Query Integration
Operating System: ALL
Participants:

 Description   

SERVER-77280 added queries during subplanning for $or that will allow plans with OR and clustered collection scans. SERVER-61259 extended these plans to work with $text nodes. However, subplanning is only entered for rooted $or queries, so queries like the one below won't use the new plans. We should add logic to use the new plans with these types of queries too.

t.find({a: 0, $or: [{_id: 2}, {$text: {$search: "foo"}}]} 


Generated at Thu Feb 08 06:37:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.