Recently I came across an error while trying to implement partial search on an encrypted(Automatic CSFLE) filed.
For example, I have an email address “firstname.lastname@example.org” in the database. When the user searches for “samp”, I have to run a query to fetch the “email@example.com” from the database. Also, the Client Side Field Level Encryption is enabled in the email field. When I try to achieve this using $regex, I’m getting the following error
“MongoError: Invalid match expression operator on encrypted field ‘name’”
I have been googling for a while but still not see any good solution. Are there any solutions to this?.