Skip to content

Update Elasticsearch handling of schools list#786

Draft
axlewin wants to merge 11 commits into
mainfrom
improvement/schools-data
Draft

Update Elasticsearch handling of schools list#786
axlewin wants to merge 11 commits into
mainfrom
improvement/schools-data

Conversation

@axlewin
Copy link
Copy Markdown
Contributor

@axlewin axlewin commented May 1, 2026

  • Modify ES ingestion & searching to use new schools list CSV properties
  • Replace old-style ES query with BooleanInstruction-based query
  • Exclude "excluded" schools from search, unless searching by exact ID
  • Allow school results to be filtered by country code

axlewin added 11 commits April 29, 2026 12:05
This is no longer used anywhere now that the school list reader uses a BooleanInstruction
The new schoolId fieldname contains a capital letter, so capitalisation matters where it didn't before. The raw fields suffix also breaks things for some reason, and since this is an exact match query anyway we don't need to explicitly disable things like stemming, so it should be safe to remove the suffix.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

❌ Patch coverage is 1.61290% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.32%. Comparing base (6d244b8) to head (1a6e0b7).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../java/uk/ac/cam/cl/dtg/isaac/dos/users/School.java 0.00% 29 Missing ⚠️
...cam/cl/dtg/segue/dao/schools/SchoolListReader.java 0.00% 12 Missing ⚠️
...java/uk/ac/cam/cl/dtg/segue/etl/SchoolIndexer.java 0.00% 9 Missing ⚠️
...am/cl/dtg/segue/api/SchoolLookupServiceFacade.java 0.00% 6 Missing ⚠️
...n/java/uk/ac/cam/cl/dtg/segue/api/AdminFacade.java 0.00% 4 Missing ⚠️
.../java/uk/ac/cam/cl/dtg/isaac/api/EventsFacade.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #786      +/-   ##
==========================================
+ Coverage   40.28%   40.32%   +0.03%     
==========================================
  Files         546      546              
  Lines       23800    23778      -22     
  Branches     2906     2901       -5     
==========================================
  Hits         9588     9588              
+ Misses      13311    13289      -22     
  Partials      901      901              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


if (matchingSchoolList.size() > 1) {
log.error("Error while looking up school up by id! More than one match for '{}' results: {}", schoolURN, matchingSchoolList);
log.error("Error while looking up school up by id! More than one match for '{}' results: {}", schoolId, matchingSchoolList);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants