I was going through salesforce documentation for shield encryption and got to know below.
Deterministic encryption comes in two types: case-sensitive and case-insensitive. With case-sensitive encryption, a SOQL query against the Contact object, where LastName = Jones, returns only Jones, not jones or JONES. Similarly, when the case-sensitive deterministic scheme tests for unicity (uniqueness), each version of “Jones” is unique. For case-insensitive, a SOQL query against the Lead object, where Company = Acme, returns Acme, acme, or ACME. When the case-insensitive scheme tests for unicity (uniqueness), each version of Acme is considered identical.
In the trailhead playground I ran following 2 cases.
Case 1: Enabled default shield encryption (Probablistic), and marked Lead 'Name' field as encrypted. Created a lead with Name = 'John Doe'
Tried to run below query on dev console [Select Id, Name FROM Lead where Name = 'John Doe'] As expected it gave me an error saying I cannot use 'Name' field in Where clause.
Case2: Enabled 'Deterministic' encryption, and changed Leads 'Name' field encryption to 'Deterministic-Case Sensitive'. Did the synch of data and tried to run the same query again.
[Select Id, Name FROM Lead WHERE Name = 'John Doe']
It still gives me same error as that of Case 1. I am not sure what is causing an error in second case? Am I reading the documentation in wrong way or am I missing something.
[Note: I did saw below warning message on encryption policy page, not sure if I need to reach out to Salesforce to do anything with my current data to run 2nd case]