Skip to content

Remove deprecated Elasticsearch query framework#794

Draft
axlewin wants to merge 25 commits into
mainfrom
hotfix/remove-deprecated-es
Draft

Remove deprecated Elasticsearch query framework#794
axlewin wants to merge 25 commits into
mainfrom
hotfix/remove-deprecated-es

Conversation

@axlewin
Copy link
Copy Markdown
Contributor

@axlewin axlewin commented Jun 1, 2026

Removes all usage of BooleanSearchClause and AbstractFilterInstruction-based searching in favour of the newer AbstractInstruction-based pattern. This removes a lot of duplicated logic; there should now be a single, consistent approach to building ES queries across the whole project. In the vast majority of cases, searches should now use a single BooleanInstruction instead of calling various helper methods.

Also removes the generateTemporaryGameboard endpoint, which has been unsupported for over a year. This change is technically unrelated but was needed in order to remove some of the ES framework.

axlewin and others added 24 commits May 26, 2026 17:22
This endpoint has been unsupported for over a year, and for two months
has been inaccessible in production (since 3d839bf).

Several deprecated methods were required for it to work, and without it
these too can be removed. This gets rid of at least one more deprecated
ES method.

Since we no longer generate random gameboards, we no longer have any
need to store temporary boards. The cache can be removed too, but for
now I have just removed the "store new temporary board" method.
No longer needed since all of its methods are superseded by AbstractInstruction-based equivalents
and convertToBoolMap helper method
Deprecated; AbstractFilterInstruction-based searching should use AbstractInstructions instead
Deprecated; AbstractFilterInstruction-based searching should use AbstractInstructions instead
This is superseded by buildBaseInstructions, which is easier to work with for AbstractInstructions (as opposed to AbstractFilterInstructions).
Also remove the tests for the removed methods.

These all used AbstractFilterInstructions. Going forward, AbstractInstruction-based searching should be used instead.
Deprecated in favour of BooleanInstructions
To allow e.g. nofilter quizzes to be viewed. If nofilter content needs to be excluded based on role, this should be handled outside of this manager (e.g. in QuizManager).
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 23.74101% with 106 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.36%. Comparing base (8320a06) to head (87ca6e0).
⚠️ Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
...n/java/uk/ac/cam/cl/dtg/isaac/api/PagesFacade.java 0.00% 32 Missing ⚠️
...cam/cl/dtg/isaac/api/managers/FastTrackManger.java 0.00% 21 Missing ⚠️
...ac/api/managers/EventNotificationEmailManager.java 0.00% 16 Missing ⚠️
...cam/cl/dtg/segue/dao/schools/SchoolListReader.java 0.00% 15 Missing ⚠️
...am/cl/dtg/segue/dao/content/GitContentManager.java 61.90% 8 Missing ⚠️
...bs/DeleteEventAdditionalBookingInformationJob.java 0.00% 5 Missing ⚠️
.../ac/cam/cl/dtg/isaac/api/managers/GameManager.java 0.00% 3 Missing ⚠️
...ava/uk/ac/cam/cl/dtg/segue/api/GlossaryFacade.java 0.00% 3 Missing ⚠️
.../cl/dtg/segue/api/managers/NotificationPicker.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
+ Coverage   40.31%   40.36%   +0.05%     
==========================================
  Files         547      541       -6     
  Lines       23773    23394     -379     
  Branches     2893     2833      -60     
==========================================
- Hits         9584     9444     -140     
+ Misses      13288    13083     -205     
+ Partials      901      867      -34     

☔ 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.

The "should" clauses should be grouped together and nested in a parent "must" to ensure at least one clause per group is satisfied.
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