diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/document/RocketHistoryDocument.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/document/RocketHistoryDocument.java index 110a780f..73c951f5 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/document/RocketHistoryDocument.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/document/RocketHistoryDocument.java @@ -2,6 +2,7 @@ package com.red.circle.other.infra.database.mongo.document; import lombok.Data; import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.index.CompoundIndex; import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Field; @@ -16,6 +17,7 @@ import java.util.List; */ @Data @Document(collection = "rocket_launch_history") +@CompoundIndex(name = "idx_room_date_launch", def = "{'roomId': 1, 'date': 1, 'launchTime': -1}") public class RocketHistoryDocument { @Id