+ Start a Discussion

SOQL Query filtering on Encrypted Fields not working

Hello  community,
I have a SOQL Query on Encrypted Fields.
I have a Contact named John Doe.
When I do "SELECT FirstName,LastName FROM Contact WHERE FirstName='John', I get 0 results.
FirstName and LastName are encrypted with "deterministic encryption, case-insensitive".
According to this help page : 
"For example, you might run a SOQL query in custom Apex code against the Contact object, where LastName = 'Smith'. If the LastName field is encrypted with probabilistic encryption, you can’t run the query. Deterministic encryption addresses this problem."
My understanding is that filterring is supposed to be supported for fields encrypted with  "deterministic encryption, case-insensitive". 
What am I missing?
How to make my SQOL query work?
Many thanks
Best Answer chosen by bretondev
I could fix the issue thanks to this blog:

I went to Setup | Platform Encryption | Key Management and generated a new tenant secret.
Then I went to Setup | Platform Encryption | Encryption STatistics and re-synced my data.