Mongo DB Indexes

The following indexes (or “indices” if that’s what you’re into) need to be created after creating the mongo instance.

Reconciliation: ------------------- db.positions.createIndex({'placementId': 1, 'positionId': 1, 'positionNumber': 1}, {name: 'plIdPosIdPosNumIdx'}) db.positions.createIndex({'positionId':1, 'positionNumber':1}, {name: 'posIdPosNumIdx'}); db.positions.createIndex({'positionId': 1}, {name: 'posIdIdx'}) InboundDataReader: ----------------- db.positionToTrust.createIndex({'positionId': 1},{name: 'idx_positionId_type'}); db.positionToDeanery.createIndex({'positionId': 1},{name: 'idx_positionId_type'}); db.trust.createIndex({'trustOdsCode': 1}, {name: 'trustOdsCode'}) Audit: -------- db.auditmessage.createIndex({'messageProperties.headers.positionNumber': 1, 'messageProperties.headers.positionId':1, 'jsonMessageBody.recordType':1},{name: 'idx_esr_position_number_id'}) db.auditmessage.createIndex({ 'jsonMessageBody.postId': 1, 'messageProperties.type':1},{name: 'idx_esr_postId_type'}); db.auditmessage.createIndex({ 'messageProperties.headers.correlationId': 1},{name: 'idx_esr_correlation_id'}); db.auditmessage.createIndex({ 'messageProperties.timestamp': 1},{name: 'idx_timestamp'}); db.auditmessage.createIndex({ 'messageProperties.messageId': 1},{name: 'idx_message_id'}); Exporter: --------- db.generatednotrecord.createIndex({'postId':1 , 'notification.notType':1, 'status':1}, {name: 'IdxPostIdNotTypeStatus'}) db.generatednotrecord.createIndex({'placementId':1, 'positionId':1,' positionNumber':1}, {name: 'plIdPosIdPosNumIdx'}, { unique: true })