Search Encrypted Data

Search on fields encrypted with equality or range encryption. The MongoDB driver encrypts your search term and MongoDB matches against encrypted values — without ever decrypting the data.

Date of Birth Range
Uses #[Encrypt(queryType: EncryptQuery::Range)] — the driver encrypts the bounds and MongoDB evaluates $gte / $lte on ciphertext. Supports int, long, double, decimal, and date types.