Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.getCollection('Collection_A').findOne({"meta.md5":"270daaa8c9da2c0ce114fd297ecb3fce"},{"pdf.status":1,"pdf.detection":1,"_id":0})
- {
- "pdf" : {
- "status" : "Completed",
- "detection" : true
- }
- }
- db.getCollection('Collection_B').find({"md5":"270daaa8c9da2c0ce114fd297ecb3fce"},{"pdf":1,"_id":0})
- {
- "pdf" : {
- "version" : {
- "decomposer" : "1.0"
- },
- "results" : {
- "status" : 1,
- "vector_value" : 2,
- "file_version" : "",
- "is_portmanteau" : false,
- "version" : {
- "decomposer" : "1.0"
- },
- "pdfid" : {
- "Encrypt" : 0,
- "stream" : 2,
- "JavaScript" : 1,
- "OpenAction" : 1,
- "JS" : 1,
- "header" : "%PDF-1.1",
- "entropy" : "",
- "totalEntropy" : "",
- "ObjStm" : 0,
- "AcroForm" : 0,
- "countEof" : "",
- "xref" : 1,
- "endobj" : 9,
- "filename" : "270daaa8c9da2c0ce114fd297ecb3fce.pdf",
- "version" : "0.2.1",
- "AA" : 0,
- "errorMessage" : "",
- "Launch" : 0,
- "RichMedia" : 0,
- "endstream" : 2,
- "nonStreamEntropy" : "",
- "JBIG2Decode" : 0,
- "trailer" : 1,
- "isPdf" : "True",
- "Page" : 1,
- "countCharAfterLastEof" : "",
- "dates" : {
- "date" : []
- },
- "obj" : 9,
- "EmbeddedFile" : 1,
- "startxref" : 1,
- "XFA" : 0,
- "Colors" : 0,
- "streamEntropy" : "",
- "errorOccurred" : "False"
- },
- "file_id" : "ae9eb8ef543504666d2c4f58e1c2ff48",
- "file_path" : "NA",
- "pdf_id_error" : ""
- },
- "scan_duration" : 0.0714380741119385
- }
- }
- {
- "pdf" : {
- "status" : "Completed",
- "detection" : true,
- "pdf" : {
- "version" : {
- "decomposer" : "1.0"
- },
- "results" : {
- "status" : 1,
- "vector_value" : 2,
- "file_version" : "",
- "is_portmanteau" : false,
- "version" : {
- "decomposer" : "1.0"
- },
- "pdfid" : {
- "Encrypt" : 0,
- "stream" : 2,
- "JavaScript" : 1,
- "OpenAction" : 1,
- "JS" : 1,
- "header" : "%PDF-1.1",
- "entropy" : "",
- "totalEntropy" : "",
- "ObjStm" : 0,
- "AcroForm" : 0,
- "countEof" : "",
- "xref" : 1,
- "endobj" : 9,
- "filename" : "270daaa8c9da2c0ce114fd297ecb3fce.pdf",
- "version" : "0.2.1",
- "AA" : 0,
- "errorMessage" : "",
- "Launch" : 0,
- "RichMedia" : 0,
- "endstream" : 2,
- "nonStreamEntropy" : "",
- "JBIG2Decode" : 0,
- "trailer" : 1,
- "isPdf" : "True",
- "Page" : 1,
- "countCharAfterLastEof" : "",
- "dates" : {
- "date" : []
- },
- "obj" : 9,
- "EmbeddedFile" : 1,
- "startxref" : 1,
- "XFA" : 0,
- "Colors" : 0,
- "streamEntropy" : "",
- "errorOccurred" : "False"
- },
- "file_id" : "ae9eb8ef543504666d2c4f58e1c2ff48",
- "file_path" : "NA",
- "pdf_id_error" : ""
- },
- "scan_duration" : 0.0714380741119385
- }
- }
- }
- db.getCollection('Collection_A').aggregate( [ { $match: {"meta.md5":"270daaa8c9da2c0ce114fd297ecb3fce"}}, { $lookup: {from: "Collection_B",localField: "meta.md5", foreignField: "md5", as: "pdf"}}, { $project: {"pdf.status":1,"pdf.detection":1,"_id":0}} ] )
- Failed to execute script.
- Error:
- Assert: command failed: {
- "ok" : 0,
- "errmsg" : "global.Collection_B cannot be sharded",
- "code" : 28769,
- "codeName" : "Location28769"
- } : aggregate failed
- _getErrorWithCode@src/mongo/shell/utils.js:25:13
- doassert@src/mongo/shell/assert.js:16:14
- assert.commandWorked@src/mongo/shell/assert.js:370:5
- DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
- DBCollection.prototype.aggregate@:1:355
- @(shell):1:1
- Error: command failed: {
- "ok" : 0,
- "errmsg" : "global.Collection_B cannot be sharded",
- "code" : 28769,
- "codeName" : "Location28769"
- } : aggregate failed :
- _getErrorWithCode@src/mongo/shell/utils.js:25:13
- doassert@src/mongo/shell/assert.js:16:14
- assert.commandWorked@src/mongo/shell/assert.js:370:5
- DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
- DBCollection.prototype.aggregate@:1:355
- @(shell):1:1
Add Comment
Please, Sign In to add comment