2018-01-10T20:53:50.772+0000 I COMMAND [conn5225] command bryx.clients appName: "MongoDB Shell" command: aggregate { aggregate: "jobs", pipeline: [ { $match: { assignment._id: { $in: [ "us.mi.wayne.detroit.C01", "us.mi.wayne.detroit.C02", "us.mi.wayne.detroit.C03", "us.mi.wayne.detroit.C04", "us.mi.wayne.detroit.C05", "us.mi.wayne.detroit.C06", "us.mi.wayne.detroit.C07", "us.mi.wayne.detroit.C08", "us.mi.wayne.detroit.C09", "us.mi.wayne.detroit.M54", "us.mi.wayne.detroit.HPL1", "us.mi.wayne.detroit.M41", "us.mi.wayne.detroit.M42", "us.mi.wayne.detroit.M43", "us.mi.wayne.detroit.M44", "us.mi.wayne.detroit.M45", "us.mi.wayne.detroit.M46", "us.mi.wayne.detroit.M47", "us.mi.wayne.detroit.M48", "us.mi.wayne.detroit.M49", "us.mi.wayne.detroit.M50", "us.mi.wayne.detroit.M51", "us.mi.wayne.detroit.M52", "us.mi.wayne.detroit.M53", "us.mi.wayne.detroit.M09", "us.mi.wayne.detroit.M10", "us.mi.wayne.detroit.M11", "us.mi.wayne.detroit.M12", "us.mi.wayne.detroit.M13", "us.mi.wayne.detroit.M14", "us.mi.wayne.detroit.M15", "us.mi.wayne.detroit.M16", "us.mi.wayne.detroit.M17", "us.mi.wayne.detroit.M18", "us.mi.wayne.detroit.M19", "us.mi.wayne.detroit.M20", "us.mi.wayne.detroit.M21", "us.mi.wayne.detroit.M22", "us.mi.wayne.detroit.M23", "us.mi.wayne.detroit.M24", "us.mi.wayne.detroit.M25", "us.mi.wayne.detroit.M26", "us.mi.wayne.detroit.M27", "us.mi.wayne.detroit.M28", "us.mi.wayne.detroit.M29", "us.mi.wayne.detroit.M30", "us.mi.wayne.detroit.M31", "us.mi.wayne.detroit.M32", "us.mi.wayne.detroit.M33", "us.mi.wayne.detroit.M34", "us.mi.wayne.detroit.M35", "us.mi.wayne.detroit.R36", "us.mi.wayne.detroit.R20", "us.mi.wayne.detroit.R21", "us.mi.wayne.detroit.R22", "us.mi.wayne.detroit.R23", "us.mi.wayne.detroit.R24", "us.mi.wayne.detroit.R25", "us.mi.wayne.detroit.R26", "us.mi.wayne.detroit.R27", "us.mi.wayne.detroit.R28", "us.mi.wayne.detroit.R29", "us.mi.wayne.detroit.R30", "us.mi.wayne.detroit.R31", "us.mi.wayne.detroit.R32", "us.mi.wayne.detroit.R33", "us.mi.wayne.detroit.R34", "us.mi.wayne.detroit.R35", "us.mi.wayne.detroit.R37", "us.mi.wayne.detroit.R38", "us.mi.wayne.detroit.R39", "us.mi.wayne.detroit.R40", "us.mi.wayne.detroit.Z01", "us.mi.wayne.detroit.Z02", "us.mi.wayne.detroit.Z03", "us.mi.wayne.detroit.Z04", "us.mi.wayne.detroit.Z05", "us.mi.wayne.detroit.Z06", "us.mi.wayne.detroit.Z07", "us.mi.wayne.detroit.Z08", "us.mi.wayne.detroit.Z09", "us.mi.wayne.detroit.Z10", "us.mi.wayne.detroit.HM1", "us.mi.wayne.detroit.HM2", "us.mi.wayne.detroit.HPC1", "us.mi.wayne.detroit.HPE2", "us.mi.wayne.detroit.HPE3", "us.mi.wayne.detroit.HPE1", "us.mi.wayne.detroit.T02", "us.mi.wayne.detroit.E01", "us.mi.wayne.detroit.E09", "us.mi.wayne.detroit.E17", "us.mi.wayne.detroit.E27", "us.mi.wayne.detroit.E29", "us.mi.wayne.detroit.E30", "us.mi.wayne.detroit.E32", "us.mi.wayne.detroit.E33", "us.mi.wayne.detroit.E34", "us.mi.wayne.detroit.E35", "us.mi.wayne.detroit.E39", "us.mi.wayne.detroit.E40", "us.mi.wayne.detroit.E41", "us.mi.wayne.detroit.E42", "us.mi.wayne.detroit.E44", "us.mi.wayne.detroit.E46", "us.mi.wayne.detroit.E49", "us.mi.wayne.detroit.E50", "us.mi.wayne.detroit.E51", "us.mi.wayne.detroit.E52", "us.mi.wayne.detroit.E53", "us.mi.wayne.detroit.E54", "us.mi.wayne.detroit.E55", "us.mi.wayne.detroit.E56", "us.mi.wayne.detroit.E57", "us.mi.wayne.detroit.E58", "us.mi.wayne.detroit.E59", "us.mi.wayne.detroit.E60", "us.mi.wayne.detroit.L20", "us.mi.wayne.detroit.L06", "us.mi.wayne.detroit.L07", "us.mi.wayne.detroit.L28", "us.mi.wayne.detroit.L14", "us.mi.wayne.detroit.L08", "us.mi.wayne.detroit.L13", "us.mi.wayne.detroit.L17", "us.mi.wayne.detroit.L19", "us.mi.wayne.detroit.L21", "us.mi.wayne.detroit.L22", "us.mi.wayne.detroit.L18", "us.mi.wayne.detroit.L30", "us.mi.wayne.detroit.L23", "us.mi.wayne.detroit.L31", "us.mi.wayne.detroit.L25", "us.mi.wayne.detroit.L26", "us.mi.wayne.detroit.L27", "us.mi.wayne.detroit.S01", "us.mi.wayne.detroit.S02", "us.mi.wayne.detroit.S03", "us.mi.wayne.detroit.S04", "us.mi.wayne.detroit.S05", "us.mi.wayne.detroit.S06", "us.mi.wayne.detroit.C01", "us.mi.wayne.detroit.C02", "us.mi.wayne.detroit.C03", "us.mi.wayne.detroit.HPC3", "us.mi.wayne.detroit.C04", "us.mi.wayne.detroit.C05", "us.mi.wayne.detroit.C06", "us.mi.wayne.detroit.C07", "us.mi.wayne.detroit.C08", "us.mi.wayne.detroit.C09", "us.mi.wayne.detroit.M01", "us.mi.wayne.detroit.M02", "us.mi.wayne.detroit.M03", "us.mi.wayne.detroit.M04", "us.mi.wayne.detroit.M05", "us.mi.wayne.detroit.M06", "us.mi.wayne.detroit.M07", "us.mi.wayne.detroit.M08", "us.mi.wayne.detroit.HAME3", "us.mi.wayne.detroit.HAME2", "us.mi.wayne.detroit.HAME1", "us.mi.wayne.detroit.HAML3", "us.mi.wayne.detroit.M36", "us.mi.wayne.detroit.M39", "us.mi.wayne.detroit.M38", "us.mi.wayne.detroit.M37", "us.mi.wayne.detroit.M40", "us.mi.wayne.detroit.E48", "us.mi.wayne.detroit.CSC", "us.mi.wayne.detroit.FB1", "us.mi.wayne.detroit.HAML1", "us.mi.wayne.detroit.Z1103", "us.mi.wayne.detroit.Z1106", "us.mi.wayne.detroit.Z1105", "us.mi.wayne.detroit.Z1104", "us.mi.wayne.detroit.606", "us.mi.wayne.detroit.809", "us.mi.wayne.detroit.605", "us.mi.wayne.detroit.812", "us.mi.wayne.detroit.608", "us.mi.wayne.detroit.607", "us.mi.wayne.detroit.602", "us.mi.wayne.detroit.600", "us.mi.wayne.detroit.811", "us.mi.wayne.detroit.806", "us.mi.wayne.detroit.803", "us.mi.wayne.detroit.805", "us.mi.wayne.detroit.804", "us.mi.wayne.detroit.802", "us.mi.wayne.detroit.801", "us.mi.wayne.detroit.Z1100", "us.mi.wayne.detroit.504", "us.mi.wayne.detroit.503", "us.mi.wayne.detroit.810", "us.mi.wayne.detroit.609", "us.mi.wayne.detroit.Z1101", "us.mi.wayne.detroit.hpc03", "us.mi.wayne.detroit.hamc10", "us.mi.wayne.detroit.z1140", "us.mi.wayne.detroit.202", "us.mi.wayne.detroit.807", "us.mi.wayne.detroit.e23x", "us.mi.wayne.detroit.e42x", "us.mi.wayne.detroit.e38x", "us.mi.wayne.detroit.201", "us.mi.wayne.detroit.808", "us.mi.wayne.detroit.613", "us.mi.wayne.detroit.z1123", "us.mi.wayne.detroit.507" ] }, disposition: { $in: [ "closed", "timedOut" ] } } }, { $sort: { ts: -1.0 } }, { $limit: 30.0 }, { $lookup: { from: "departments", localField: "dept", foreignField: "_id", as: "dept" } }, { $unwind: "$dept" }, { $unwind: { path: "$response", preserveNullAndEmptyArrays: true } }, { $lookup: { from: "clients", localField: "response._id", foreignField: "_id", as: "response.client" } }, { $unwind: { path: "$response.client", preserveNullAndEmptyArrays: true } }, { $group: { _id: "$_id", crossStreets: { $first: "$crossStreets" }, city: { $first: "$city" }, comp: { $first: "$comp" }, lastModified: { $first: "$lastModified" }, location: { $first: "$location" }, centroid: { $first: "$centroid" }, units: { $first: "$units" }, state: { $first: "$state" }, incidentID: { $first: "$incidentID" }, street: { $first: "$street" }, disposition: { $first: "$disposition" }, box: { $first: "$box" }, priority: { $first: "$priority" }, type: { $first: "$type" }, assignment: { $first: "$assignment" }, ts: { $first: "$ts" }, locationOfIncident: { $first: "$locationOfIncident" }, synopsis: { $first: "$synopsis" }, supp: { $first: "$supp" }, locationInfo: { $first: "$locationInfo" }, cadId: { $first: "$cadID" }, hasHistoricalJobs: { $first: "$hasHistoricalJobs" }, dept: { $first: "$dept._id" }, displayResponders: { $first: "$dept.displayResponders" }, responders: { $addToSet: { _id: "$response._id", time: "$response.responseTime", response: "$response.verboseResponse", yes: "$response.yes", responseType: "$response.responseType", type: "$response.client.bryx911Type", email: "$response.client.email", phone: "$response.client.phone", name: "$response.client.cn", location: { $cond: [ "$response.client.location.properties.show", "$response.client.location", null ] } } } } }, { $project: { crossStreets: 1.0, city: 1.0, comp: 1.0, lastModified: 1.0, location: 1.0, centroid: 1.0, units: 1.0, state: 1.0, incidentID: 1.0, street: 1.0, disposition: 1.0, box: 1.0, priority: 1.0, type: 1.0, assignment: 1.0, ts: 1.0, locationOfIncident: 1.0, synopsis: 1.0, hasHistoricalJobs: { $ifNull: [ "$hasHistoricalJobs", false ] }, supp: { $map: { input: { $filter: { input: "$supp", as: "s", cond: { $in: [ "$$s.messageType", [ "supplemental", "hazardInformation", "fireWarning" ] ] } } }, as: "s", in: { _id: "$$s._id", txt: "$$s.txt", messageType: "$$s.messageType", ts: "$$s.ts" } } }, locationInfo: 1.0, cadId: 1.0, dept: 1.0, displayResponders: { $ifNull: [ "$displayResponders", true ] }, responders: { $filter: { input: "$responders", as: "r", cond: { $and: [ { $lt: [ null, "$$r._id" ] }, { $or: [ { $and: [ { $eq: [ "POSITIVE", "ALL" ] }, { $eq: [ "$$r.yes", true ] } ] }, { $and: [ { $eq: [ "NEGATIVE", "ALL" ] }, { $eq: [ "$$r.yes", false ] } ] }, { $eq: [ "ALL", "ALL" ] } ] } ] } } }, patients: [], canTrucksRespond: { $literal: false }, showForcedResponse: { $literal: false }, canHospitalAlert: { $literal: false }, availableResponses: [], canRespond: { $literal: false }, hospitals: [] } }, { $sort: { ts: -1.0 } } ], cursor: {}, $clusterTime: { clusterTime: Timestamp(1515617624, 14), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } }, $db: "bryx" } planSummary: IXSCAN { ts: 1, assignment._id: 1, centroid: 1 } keysExamined:696 docsExamined:554 hasSortStage:1 cursorExhausted:1 numYields:5 nreturned:30 reslen:57693 locks:{ Global: { acquireCount: { r: 378 } }, Database: { acquireCount: { r: 189 } }, Collection: { acquireCount: { r: 188 } } } protocol:op_msg 62ms