CreateDBIndexes.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. //ArchivedImage
  2. db.getCollection("ArchivedImages").createIndex({ "IsDeleted": -1,"OrganizationId": 1,"HashCode": 1})
  3. //UltrasoundFile
  4. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseInfos._id": 1,"ImageCaseInfos.IsLabeled": 1,"Labeled": -1,"IsAdoptable": 1,"GoldStandardLabeledFileId": 1})
  5. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseInfos._id": 1,"ImageCaseInfos.IsLabeled": 1,"Labeled": -1,"Source.FileName": 1, "HasQuestioned": 1,"HasPendingConfirmed": 1,"CreateTime": -1})
  6. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseInfos._id": 1,"ImageCaseInfos.HasSeen": 1,"HasSeen": 1,"Source.FileName": 1 })
  7. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseInfos._id": 1,"ImageCaseInfos.IsSkipped": 1,"IsSkipped": 1,"Source.FileName": 1 })
  8. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseInfos._id": 1,"ImageCaseInfos.IsLabeled": 1,"GoldStandardLabeledFileId": 1,"Source.FileName": 1, "CreateTime": -1})
  9. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseInfos._id": 1,"ImageCaseInfos.IsLabeled": 1,"Assigned": 1,"GoldStandardLabeledFileId": 1, "CreateTime": 1})
  10. db.getCollection("UltrasoundFiles").createIndex({ "_id": 1,"GoldStandardLabeledFileId": 1})
  11. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageBatchId": 1, "UpdateTime": -1})
  12. db.getCollection("UltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ArchivedImageId": 1})
  13. //LabeledUltrasoundFile
  14. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseId": 1,"IsGoldStandard": -1,"Source.FileName": 1, "CreateTime": -1})
  15. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseId": 1,"UltrasoundFileId": 1, "Labeler._id":1, "IsImportedFormOldData": -1})
  16. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseId": 1,"IsRelabeled": 1,"UltrasoundFileId": 1,"Labeler._id": 1, "DeveloperItem.QuestionedState":1, "SourceLabeledUltrasoundFileId":1, "DeveloperItem.ConfirmedState":1})
  17. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted":1, "ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseId": 1,"IsAdoptable": -1, "IsInvalid":1, "ReviewState":1})
  18. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted":1, "Labeler._id": 1,"CreateTime": 1})
  19. db.getCollection("LabeledUltrasoundFiles").createIndex({ "_id":1,"UltrasoundFileId":1})
  20. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ArchivedImageId": 1})
  21. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"UltrasoundFileId": 1,"IsAdoptable": -1})
  22. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"UltrasoundGroupId": 1,"IsSkipped": -1})
  23. db.getCollection("LabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1,"ImageBatchId": 1,"ImageCaseId": 1,"UltrasoundGroupId": 1, "IsSkipped":-1, "IsAdoptable": -1, "IsGoldStandard": -1})
  24. //DeveloperFolderFile
  25. db.getCollection("DeveloperFolderFiles").createIndex({ "IsDeleted": -1,"DeveloperFolderId": 1,"Name": 1,"Index": 1})
  26. db.getCollection("DeveloperFolderFiles").createIndex({ "IsDeleted": -1,"DeveloperFolderId": 1,"HasQuestioned": 1,"Index": 1})
  27. db.getCollection("DeveloperFolderFiles").createIndex({ "IsDeleted": -1,"DeveloperFolderId": 1,"Name": 1,"HasQuestioned": 1,"Index": 1})
  28. db.getCollection("DeveloperFolderFiles").createIndex({ "IsDeleted": -1,"UltrasoundFileId": 1,"DeveloperFolderId": 1})
  29. db.getCollection("DeveloperFolderFiles").createIndex({ "IsDeleted": -1,"DeveloperLabeledUltrasoundInfoList.LabeledUltrasoundFileId": 1 })
  30. //DeveloperLabeledUltrasoundFile
  31. db.getCollection("DeveloperLabeledUltrasoundFiles").createIndex({ "IsDeleted": -1,"UltrasoundFileId": 1,"DeveloperFolderId": 1})
  32. //AssignedLabelCaseFile
  33. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"AssignedLabelCaseId": 1, "HasSeen":-1, "IsLabeled":-1, "Index":1 })
  34. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"AssignedLabelCaseId": 1, "IsReviewFailed":1, "Index":1 })
  35. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"AssignedLabelCaseId": 1, "RelabelState":1, "QuestionedState":1, "Index":1 })
  36. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"AssignedLabelCaseId": 1, "LabeledUltrasoundFileIds.k":1 })
  37. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"AssignedLabelCaseId": 1, "MixedFileType":1 })
  38. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"LabeledUltrasoundFileIds.k": 1, "IsRelabeled":-1 })
  39. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"ImageCategoryId": 1, "UltrasoundFileId":1, "IsLabeled":-1 })
  40. db.getCollection("AssignedLabelCaseFiles").createIndex({ "IsDeleted": -1,"AssignedLabelCaseId": 1, "UltrasoundFileId":1, "IsLabeled":-1 })
  41. //AssignedReviewCaseFile
  42. db.getCollection("AssignedReviewCaseFiles").createIndex({ "IsDeleted": -1,"AssignedReviewCaseId": 1,"HasSeen": 1,"Index": 1 })
  43. db.getCollection("AssignedReviewCaseFiles").createIndex({ "IsDeleted": -1,"AssignedReviewCaseId": 1,"ReAuditState": 1, "QuestionedState":1, "Index": 1 })
  44. db.getCollection("AssignedReviewCaseFiles").createIndex({ "IsDeleted": -1,"LabeledItems.AssignedLabelCaseFileId": 1 })
  45. //SameBatchLabelCase
  46. db.getCollection("SameBatchLabelCases").createIndex({ "IsDeleted": -1,"Organization._id": 1,"ImageCategoryId": 1, "Name": 1,"CreateTime": 1, "UpdateTime":1 })
  47. db.getCollection("SameBatchLabelCases").createIndex({ "Labelers.AssignedLabelCaseId": 1 })
  48. db.getCollection("SameBatchLabelCases").createIndex({ "Name": 1,"Labelers._id": 1 })
  49. db.getCollection("SameBatchLabelCases").createIndex({ "IsDeleted": -1,"State": 1 })
  50. //AssignedLabelCase
  51. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "ImageCaseId": 1 })
  52. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "ImageCategoryId": 1, "SeenCount":1, "LabeledCount":1, "Count":1, "CaseIndex": 1 })
  53. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "ImageCategoryId": 1, "RelabelState":1, "QuestionedState":1, "CaseIndex": 1 })
  54. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "SeenCount":1, "LabeledCount":1, "Count":1, "CaseIndex": 1 })
  55. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "CreateTime": 1 })
  56. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "LabelCaseStatisticsId": 1 })
  57. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "SameBatchLabelCaseId": 1 })
  58. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "SameBatchLabelCaseId": 1, "LabeledCount":1 })
  59. db.getCollection("AssignedLabelCases").createIndex({ "IsDeleted": -1, "SameBatchLabelCaseId": 1, "RelabelState":1 })
  60. //AssignedReviewCase
  61. db.getCollection("AssignedReviewCases").createIndex({ "IsDeleted": -1, "Reviewer._id": 1, "SameBatchLabelCaseId": 1 })
  62. db.getCollection("AssignedReviewCases").createIndex({ "IsDeleted": -1, "Reviewer._id": 1, "IsReviewFinished": 1, "CaseIndex": 1 })
  63. db.getCollection("AssignedReviewCases").createIndex({ "IsDeleted": -1, "Reviewer._id": 1, "ImageCategoryId": 1, "IsReviewFinished": 1, "CaseIndex": 1 })
  64. //ImageCategory
  65. db.getCollection("ImageCategories").createIndex({ "IsDeleted": -1, "LabelPackageContentId": 1, "HasChildren": 1 })
  66. db.getCollection("ImageCategories").createIndex({ "IsDeleted": -1, "Name": 1, "OrganizationId": 1 })
  67. db.getCollection("ImageCategories").createIndex({ "IsDeleted": -1, "Developers": 1, "Sharers":1 })
  68. db.getCollection("ImageCategories").createIndex({ "IsDeleted": -1, "Name": 1, "Parent._id": 1 })
  69. db.getCollection("ImageCategories").createIndex({ "IsDeleted": -1, "Parent._id": 1, "Developers": 1 })
  70. db.getCollection("ImageCategories").createIndex({ "IsDeleted": -1, "SameBatchLabelCaseId": 1, "Level":1 })
  71. //LabelerGroup
  72. db.getCollection("LabelerGroups").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "ImageCategoryId": 1 })
  73. db.getCollection("LabelerGroups").createIndex({ "IsDeleted": -1, "OrganizationId": 1, "Labeler.Name": 1, "ImageCategoryId": 1, "UpdateTime":1 })
  74. //LabelerGroupItem
  75. db.getCollection("LabelerGroupItems").createIndex({ "IsDeleted": -1, "LabelerGroupId": 1, "AssignedLabelCaseId": 1, "AssignedReviewCaseId": 1, "CreateTime": -1 })
  76. //LabelCaseStatistic
  77. db.getCollection("LabelCaseStatistics").createIndex({ "IsDeleted": -1, "AssignedLabelCaseId": 1 })
  78. db.getCollection("LabelCaseStatistics").createIndex({ "IsDeleted": -1, "Labeler._id": 1, "CreateTime": -1 })
  79. db.getCollection("LabelCaseStatistics").createIndex({ "IsDeleted": -1, "SameBatchLabelCaseId": 1 })
  80. //GoldStandardAssignedFile
  81. db.getCollection("GoldStandardAssignedFiles").createIndex({ "UltrasoundFileId": 1 })
  82. db.getCollection("GoldStandardAssignedFiles").createIndex({ "IsDeleted": -1, "ImageCategoryId": 1, "LabelerAssignedInfos.Labeler._id": 1 })
  83. //SelfCheckAssignedFile
  84. db.getCollection("SelfCheckAssignedFiles").createIndex({ "UltrasoundFileId": 1 })
  85. db.getCollection("SelfCheckAssignedFiles").createIndex({ "IsDeleted": -1, "ImageCategoryId": 1, "LabelerAssignedInfos.Labeler._id": 1 })
  86. --------------------------系统日志 端口号10011----------------------------------------------------------------------------------------------------------------------------------------
  87. //LogItem
  88. db.getCollection("LogItems").createIndex({ "IsDeleted": -1, "Message": 1, "CreateTime": -1 })
  89. --------------------------以下暂不添加--------------------------------------------------------------------------------------------------------------------------------------------------
  90. //TrainTask
  91. db.getCollection("TrainTasks").createIndex({ "DeveloperId": 1})
  92. db.getCollection("TrainTasks").createIndex({ "TaskName": 1})
  93. db.getCollection("TrainTasks").createIndex({ "Result": 1})
  94. //TrainTaskStatus
  95. db.getCollection("TrainTaskStatus").createIndex({ "TrainTaskId": 1,"IsDeleted": -1,})
  96. //TrainScriptPackage
  97. db.getCollection("TrainScriptPackages").createIndex({ "DeveloperId": 1,"Name": 1,})