I am queryable encryption to automatically encrypt certain fields using random algorithm. Encryption rules are specified using Json schema. I can save the collection and the sensitive fields are automatically encrypted, but getting below error when I search by the sensitive field
nested exception is org.springframework.data.mongodb.UncategorizedMongoDbException: Exception in encryption library: csfle "analyze_query" failed: Cannot query on fields encrypted with the randomized encryption algorithm [Error 2, code 51158]; nested exception is com.mongodb.MongoClientException: Exception in encryption library: csfle "analyze_query" failed: Cannot query on fields encrypted with the randomized encryption algorithm [Error 2, code 51158]] with root cause
com.mongodb.crypt.capi.MongoCryptException: csfle "analyze_query" failed: Cannot query on fields encrypted with the randomized encryption algorithm [Error 2, code 51158]
at com.mongodb.crypt.capi.MongoCryptContextImpl.throwExceptionFromStatus(MongoCryptContextImpl.java:156)
Does this mean searching by encrypted field is not possible when using random algorithm ?
I can query if deterministic algorithm is used.
Vinod