[SERVER-77672] Allow compound wildcard indexes to provide index bounds for $and query Created: 01/Jun/23  Updated: 29/Oct/23  Resolved: 19/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc5

Type: Improvement Priority: Major - P3
Reporter: Ruoxin Xu Assignee: Ruoxin Xu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
Related
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Sprint: QO 2023-06-12, QO 2023-06-26
Participants:
Linked BF Score: 154

 Description   

SERVER-75545 imposed a rule that overkills the usage of a compound wildcard index with regular prefix field, especially for $and query. This rule should only apply to $or queries because it’s still a correctness issue that an expanded CWI answering $or query could cause missing documents. The CWI should still be able to provide a bounded plan for $and queries, for example, one very common case - a CWI {a:1, “sub.$**”: 1} should answer both point and range queries like {a:1, “sub.a”: 1}, {a: {$gt: 1}, “sub.c”: {$gt: 1}}.



 Comments   
Comment by Githook User [ 24/Jun/23 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-77672 Expand the index bounds of compound wildcard index retaining the key pattern

(cherry picked from commit 585b48afc8da5040c8530caf6c4c388ee9f8ae10)
Branch: v7.0
https://github.com/mongodb/mongo/commit/b8abe36ed027935c44f6a5d25b4be6b709285af8

Comment by Githook User [ 23/Jun/23 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-77672 Expand the index bounds of compound wildcard index retaining the key pattern
Branch: master
https://github.com/mongodb/mongo/commit/585b48afc8da5040c8530caf6c4c388ee9f8ae10

Comment by Githook User [ 20/Jun/23 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-77672 Allow compound wildcard indexes to provide index bounds for $and query

(cherry picked from commit bba21e9a07533b730c45a91fd54aa3312ecafe95)
Branch: v7.0
https://github.com/mongodb/mongo/commit/eaecffbbfd5d56fd617bc0edc57f1b043ff177cf

Comment by Githook User [ 16/Jun/23 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-77672 Allow compound wildcard indexes to provide index bounds for $and query
Branch: master
https://github.com/mongodb/mongo/commit/bba21e9a07533b730c45a91fd54aa3312ecafe95

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