From 8889cb4e12adc23693f88007c9187323e4232570 Mon Sep 17 00:00:00 2001 From: Kamal Mohammed Date: Tue, 10 Dec 2024 14:08:16 -0700 Subject: [PATCH] GRAD2-3166 - Slowness in retrieving data from Redis cache --- .../trax/model/entity/institute/NeighborhoodLearningEntity.java | 1 + .../bc/gov/educ/api/trax/model/entity/institute/NoteEntity.java | 2 ++ .../api/trax/model/entity/institute/SchoolAddressEntity.java | 1 + .../api/trax/model/entity/institute/SchoolContactEntity.java | 1 + .../api/trax/model/entity/institute/SchoolDetailEntity.java | 2 ++ .../gov/educ/api/trax/model/entity/institute/SchoolEntity.java | 2 ++ .../trax/model/entity/institute/SchoolFundingGroupEntity.java | 1 + .../educ/api/trax/model/entity/institute/SchoolMoveEntity.java | 2 ++ 8 files changed, 12 insertions(+) diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NeighborhoodLearningEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NeighborhoodLearningEntity.java index e4d895e2..fb239e13 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NeighborhoodLearningEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NeighborhoodLearningEntity.java @@ -15,6 +15,7 @@ public class NeighborhoodLearningEntity { @Id private String neighborhoodLearningId; + @Indexed private String schoolId; private String neighborhoodLearningTypeCode; private String createUser; diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NoteEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NoteEntity.java index 0f50f0f2..74c78846 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NoteEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/NoteEntity.java @@ -15,7 +15,9 @@ public class NoteEntity { @Id private String noteId; + @Indexed private String schoolId; + @Indexed private String districtId; private String independentAuthorityId; private String content; diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolAddressEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolAddressEntity.java index 86356a9b..f389c4a5 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolAddressEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolAddressEntity.java @@ -15,6 +15,7 @@ public class SchoolAddressEntity { @Id private String schoolAddressId; + @Indexed private String schoolId; private String addressTypeCode; private String addressLine1; diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolContactEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolContactEntity.java index 0b4459ed..8d5a410a 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolContactEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolContactEntity.java @@ -15,6 +15,7 @@ public class SchoolContactEntity { @Id private String schoolContactId; + @Indexed private String schoolId; private String schoolContactTypeCode; private String phoneNumber; diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolDetailEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolDetailEntity.java index 81dd07db..909393c3 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolDetailEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolDetailEntity.java @@ -17,7 +17,9 @@ public class SchoolDetailEntity { @Id private String schoolId; + @Indexed private String districtId; + @Indexed private String mincode; private String independentAuthorityId; private String schoolNumber; diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolEntity.java index aeb9d0c3..91bf1020 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolEntity.java @@ -14,7 +14,9 @@ public class SchoolEntity { @Id private String schoolId; + @Indexed private String districtId; + @Indexed private String mincode; private String independentAuthorityId; private String schoolNumber; diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolFundingGroupEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolFundingGroupEntity.java index 97cff0c4..e27e5434 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolFundingGroupEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolFundingGroupEntity.java @@ -15,6 +15,7 @@ public class SchoolFundingGroupEntity { @Id private String schoolFundingGroupID; + @Indexed private String schoolId; private String schoolGradeCode; private String schoolFundingGroupCode; diff --git a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolMoveEntity.java b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolMoveEntity.java index e2eda3e5..642b48e8 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolMoveEntity.java +++ b/api/src/main/java/ca/bc/gov/educ/api/trax/model/entity/institute/SchoolMoveEntity.java @@ -15,7 +15,9 @@ public class SchoolMoveEntity { @Id private String schoolMoveId; + @Indexed private String toSchoolId; + @Indexed private String fromSchoolId; private String moveDate; private String createUser;