Guest User

Untitled

a guest
Nov 27th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. db.getCollection('Collection_A').findOne({"meta.md5":"270daaa8c9da2c0ce114fd297ecb3fce"},{"pdf.status":1,"pdf.detection":1,"_id":0})
  2.  
  3. {
  4. "pdf" : {
  5. "status" : "Completed",
  6. "detection" : true
  7. }
  8. }
  9.  
  10. db.getCollection('Collection_B').find({"md5":"270daaa8c9da2c0ce114fd297ecb3fce"},{"pdf":1,"_id":0})
  11.  
  12. {
  13. "pdf" : {
  14. "version" : {
  15. "decomposer" : "1.0"
  16. },
  17. "results" : {
  18. "status" : 1,
  19. "vector_value" : 2,
  20. "file_version" : "",
  21. "is_portmanteau" : false,
  22. "version" : {
  23. "decomposer" : "1.0"
  24. },
  25. "pdfid" : {
  26. "Encrypt" : 0,
  27. "stream" : 2,
  28. "JavaScript" : 1,
  29. "OpenAction" : 1,
  30. "JS" : 1,
  31. "header" : "%PDF-1.1",
  32. "entropy" : "",
  33. "totalEntropy" : "",
  34. "ObjStm" : 0,
  35. "AcroForm" : 0,
  36. "countEof" : "",
  37. "xref" : 1,
  38. "endobj" : 9,
  39. "filename" : "270daaa8c9da2c0ce114fd297ecb3fce.pdf",
  40. "version" : "0.2.1",
  41. "AA" : 0,
  42. "errorMessage" : "",
  43. "Launch" : 0,
  44. "RichMedia" : 0,
  45. "endstream" : 2,
  46. "nonStreamEntropy" : "",
  47. "JBIG2Decode" : 0,
  48. "trailer" : 1,
  49. "isPdf" : "True",
  50. "Page" : 1,
  51. "countCharAfterLastEof" : "",
  52. "dates" : {
  53. "date" : []
  54. },
  55. "obj" : 9,
  56. "EmbeddedFile" : 1,
  57. "startxref" : 1,
  58. "XFA" : 0,
  59. "Colors" : 0,
  60. "streamEntropy" : "",
  61. "errorOccurred" : "False"
  62. },
  63. "file_id" : "ae9eb8ef543504666d2c4f58e1c2ff48",
  64. "file_path" : "NA",
  65. "pdf_id_error" : ""
  66. },
  67. "scan_duration" : 0.0714380741119385
  68. }
  69. }
  70.  
  71. {
  72. "pdf" : {
  73. "status" : "Completed",
  74. "detection" : true,
  75. "pdf" : {
  76. "version" : {
  77. "decomposer" : "1.0"
  78. },
  79. "results" : {
  80. "status" : 1,
  81. "vector_value" : 2,
  82. "file_version" : "",
  83. "is_portmanteau" : false,
  84. "version" : {
  85. "decomposer" : "1.0"
  86. },
  87. "pdfid" : {
  88. "Encrypt" : 0,
  89. "stream" : 2,
  90. "JavaScript" : 1,
  91. "OpenAction" : 1,
  92. "JS" : 1,
  93. "header" : "%PDF-1.1",
  94. "entropy" : "",
  95. "totalEntropy" : "",
  96. "ObjStm" : 0,
  97. "AcroForm" : 0,
  98. "countEof" : "",
  99. "xref" : 1,
  100. "endobj" : 9,
  101. "filename" : "270daaa8c9da2c0ce114fd297ecb3fce.pdf",
  102. "version" : "0.2.1",
  103. "AA" : 0,
  104. "errorMessage" : "",
  105. "Launch" : 0,
  106. "RichMedia" : 0,
  107. "endstream" : 2,
  108. "nonStreamEntropy" : "",
  109. "JBIG2Decode" : 0,
  110. "trailer" : 1,
  111. "isPdf" : "True",
  112. "Page" : 1,
  113. "countCharAfterLastEof" : "",
  114. "dates" : {
  115. "date" : []
  116. },
  117. "obj" : 9,
  118. "EmbeddedFile" : 1,
  119. "startxref" : 1,
  120. "XFA" : 0,
  121. "Colors" : 0,
  122. "streamEntropy" : "",
  123. "errorOccurred" : "False"
  124. },
  125. "file_id" : "ae9eb8ef543504666d2c4f58e1c2ff48",
  126. "file_path" : "NA",
  127. "pdf_id_error" : ""
  128. },
  129. "scan_duration" : 0.0714380741119385
  130. }
  131. }
  132. }
  133.  
  134. 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}} ] )
  135.  
  136. Failed to execute script.
  137.  
  138. Error:
  139. Assert: command failed: {
  140. "ok" : 0,
  141. "errmsg" : "global.Collection_B cannot be sharded",
  142. "code" : 28769,
  143. "codeName" : "Location28769"
  144. } : aggregate failed
  145. _getErrorWithCode@src/mongo/shell/utils.js:25:13
  146. doassert@src/mongo/shell/assert.js:16:14
  147. assert.commandWorked@src/mongo/shell/assert.js:370:5
  148. DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
  149. DBCollection.prototype.aggregate@:1:355
  150. @(shell):1:1
  151.  
  152. Error: command failed: {
  153. "ok" : 0,
  154. "errmsg" : "global.Collection_B cannot be sharded",
  155. "code" : 28769,
  156. "codeName" : "Location28769"
  157. } : aggregate failed :
  158. _getErrorWithCode@src/mongo/shell/utils.js:25:13
  159. doassert@src/mongo/shell/assert.js:16:14
  160. assert.commandWorked@src/mongo/shell/assert.js:370:5
  161. DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
  162. DBCollection.prototype.aggregate@:1:355
  163. @(shell):1:1
Add Comment
Please, Sign In to add comment