[SERVER-68030] Rewrite encrypted equality query to range query when only range index exists Created: 13/Jul/22  Updated: 29/Oct/23  Resolved: 31/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: Ted Tuckman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-67210 Generate placeholders for open range ... Closed
Duplicate
is duplicated by SERVER-68272 Rewrite equality predicate for encryp... Closed
Backwards Compatibility: Fully Compatible
Sprint: QO 2022-09-05
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}}]}



 Comments   
Comment by Githook User [ 31/Aug/22 ]

Author:

{'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com', 'username': 'TedTuckman'}

Message: SERVER-68030 Support $eq in FLE2 if there is only an encrypted range index
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/9e834e673b62f03de7ef3779d61892317bb9df78

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