-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
The children expressions of $elemMatch are parsed as top-level expressions, without the path prefix of the enclosing array. Therefore, when we recurse into the children expressions and try and look up the encryption metadata for the path, we get the metadata for the top-level schema rather than any schema information for the embedded document in the array field.
This ticket should add a way to automatically prepend the path prefix of the array field to all requests for metadata to a given EncryptionSchemaTree. That way we could pass this "prefixed" schemaTree down to the recursive query analysis call to allow query analysis to access the proper encryption metadata.
- is related to
-
SERVER-68901 Incorrect $elemMatch query analysis in mongocryptd if document contains 2 different fields with the same name
- Closed