|
mongocryptd does not echo back server API fields for "explain" command:
var findCmd = {
|
"find": "default",
|
"filter": {
|
"encrypted_string": "string1"
|
},
|
"apiVersion": "1",
|
"jsonSchema": {},
|
"isRemoteSchema": true
|
}
|
var explainCmd = {
|
"explain": {
|
"find": "default",
|
"filter": {
|
"encrypted_string": "string1"
|
}
|
},
|
"apiVersion": "1",
|
"jsonSchema": {},
|
"isRemoteSchema": true
|
}
|
print ("output of find:")
|
printjson (db.runCommand(findCmd))
|
print ("output of explain:")
|
printjson (db.runCommand(explainCmd))
|
Results in:
output of find:
|
{
|
"hasEncryptionPlaceholders" : false,
|
"schemaRequiresEncryption" : false,
|
"result" : {
|
"find" : "default",
|
"filter" : {
|
"encrypted_string" : {
|
"$eq" : "string1"
|
}
|
},
|
"apiVersion" : "1",
|
"lsid" : {
|
"id" : UUID("4f77d319-e271-4ab1-8f10-8d830c27b777")
|
}
|
},
|
"ok" : 1
|
}
|
output of explain:
|
{
|
"hasEncryptionPlaceholders" : false,
|
"schemaRequiresEncryption" : false,
|
"result" : {
|
"explain" : {
|
"find" : "default",
|
"filter" : {
|
"encrypted_string" : {
|
"$eq" : "string1"
|
}
|
}
|
},
|
"verbosity" : "allPlansExecution"
|
},
|
"ok" : 1
|
}
|
The "find" command response contains "apiVersion" field but it's missing from "explain" response.
|