[SERVER-68272] Rewrite equality predicate for encrypted to range predicate when there is only a range index Created: 25/Jul/22  Updated: 05/Dec/22  Resolved: 02/Aug/22

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

Type: Task Priority: Major - P3
Reporter: Davis Haupt (Inactive) Assignee: Backlog - Query Optimization
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-68030 Rewrite encrypted equality query to r... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

If an encrypted field has both an equality index and a range index, the equality index will be used as before to answer equality queries. If an encrypted field only has a range index, however, query analysis should rewrite the query to correctly return results without an equality index.

{x: {$eq: 26}}
will be rewritten to
{$and: [{x: {$gte: 26}}, {x: {$lte: 26}}]}


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