I am using encrypted mailing field for distance search in Apex code and queryEditor, but its not working with encrypted mailing address. Below is my query:
SELECT id, DISTANCE( MailingAddress, GEOLOCATION(27.9581331,-81.9425701 ), 'mi' ) Distancetoaddr,LastName,FirstName,Account.Phone,Title FROM Contact WHERE (DISTANCE( MailingAddress, GEOLOCATION(27.9581331,-81.9425701), 'mi' ) < 100 )
in logs getting bellow error as:
Salesforce Internal Error. (nothing else is given)
When running the query in queryEditor, below error i am getting:
[object Object]: QueryExpr needs at least one rightOperand: operator w dataType 19
I do not understand this error.
But after removing the encryption , I am getting correct results.
Problem is, I do not find any document or anything online where Encryption Limitations are given for distance function also.
Please help me out here. Thanks in Advance.