Skip to content

Commit 242ab9e

Browse files
committed
fix: improve performance
1 parent f19f025 commit 242ab9e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/java/fr/insee/genesis/infrastructure/document/metadata/QuestionnaireMetadataDocument.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ I choose to keep the record here (this choice can be challenged)*/
1212
"java:S6355" // Add 'since' and/or 'forRemoval' arguments to the @Deprecated annotation
1313
})
1414
@CompoundIndex(name = "questionnaireId_1_mode_1", def = "{'questionnaireId': 1, 'mode': 1}")
15+
@CompoundIndex(name = "collectionInstrumentId_1_mode_1", def = "{'collectionInstrumentId': 1, 'mode': 1}")
1516
@Document(collection = "questionnaireMetadatas")
1617
public record QuestionnaireMetadataDocument(
1718
@Deprecated

src/main/java/fr/insee/genesis/infrastructure/document/surveyunit/SurveyUnitDocument.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
@CompoundIndex(name = "questionnaireId_1_campaignId_1", def = "{'questionnaireId': 1, 'campaignId': 1}")
1717
@CompoundIndex(name = "questionnaireId_1_interrogationId_1", def = "{'questionnaireId': 1, 'interrogationId': 1}")
1818
@CompoundIndex(name = "interrogationId_1_questionnaireId_1", def = "{'interrogationId': 1, 'questionnaireId': 1}")
19+
@CompoundIndex(name = "collectionInstrumentId_1_interrogationId_1", def = "{'collectionInstrumentId': 1, 'interrogationId': 1}")
20+
@CompoundIndex(name = "interrogationId_1_collectionInstrumentId_1", def = "{'interrogationId': 1, 'collectionInstrumentId': 1}")
1921
@JsonIgnoreProperties(ignoreUnknown = true)
2022
public class SurveyUnitDocument {
2123

0 commit comments

Comments
 (0)