Skip to content

Disregard title suffixes when finding linked fasttrack questions - #842

Merged
barna-isaac merged 6 commits into
mainfrom
hotfix/ft-title-matching
Oct 20, 2026
Merged

barna-isaac merged 6 commits into
mainfrom
hotfix/ft-title-matching

Conversation

@axlewin

@axlewin axlewin commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

If the concept name is "Title", this query should also match questions titled "Title 1i", "Title 1ii", "Title 2i",...

Until next week's release, the content's titles (both in the conceptTitle sent by the frontend and in the ES index) will not contain the suffixes. These changes are backwards-compatible with this; the regex match encapsulates an exact match as was used before.

If the concept name is "Title", this query should also match questions titled "Title 1i", "Title 1ii", "Title 2i",...

This must be a regex query rather than a prefix query to avoid clashes between topics with similar names (e.g. "Circles" vs "Circles and Geometry").
@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.61%. Comparing base (74f9ff1) to head (d7e97ea).

Files with missing lines Patch % Lines
.../ac/cam/cl/dtg/segue/search/RegexpInstruction.java 0.00% 6 Missing ⚠️
...cam/cl/dtg/segue/search/ElasticSearchProvider.java 0.00% 5 Missing ⚠️
...cam/cl/dtg/isaac/api/managers/FastTrackManger.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #842      +/-   ##
==========================================
- Coverage   41.63%   41.61%   -0.03%     
==========================================
  Files         552      553       +1     
  Lines       23759    23773      +14     
  Branches     2884     2885       +1     
==========================================
  Hits         9892     9892              
- Misses      12969    12983      +14     
  Partials      898      898              

☔ View full report in Codecov by Harness.
📢 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.

@axlewin
axlewin marked this pull request as ready for review October 13, 2026 14:27

@barna-isaac barna-isaac left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should work OK on the content we now have (I haven't checked though), and the regexp is specific enough I'm not too worried about it accidentally matching content.

However, the fasttrack graph is just as broken (at least for me locally) as it was without these changes when I visit a fasttrack page on the new content. I think this is because once the title goes "2x2 Operations" -> "2x2 Operations 1ii", titleRegex becomes 2x2 Operations 1ii([ ][0-9]+i{1,2})?, which matches nothing.

@axlewin

axlewin commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

However, the fasttrack graph is just as broken (at least for me locally) as it was without these changes when I visit a fasttrack page on the new content. I think this is because once the title goes "2x2 Operations" -> "2x2 Operations 1ii", titleRegex becomes 2x2 Operations 1ii([ ][0-9]+i{1,2})?, which matches nothing.

Good spot. This was being handled in the frontend changes, but since we'll need to run these API changes alongside the current frontend for a while, the title sanitisation ought to be moved here instead.

@barna-isaac barna-isaac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-tested this using the proposed final state (updated APP and API), titles in content include fasttrack suffixes. Looks good!

@barna-isaac
barna-isaac merged commit 18efa97 into main Oct 20, 2026
5 checks passed
@barna-isaac
barna-isaac deleted the hotfix/ft-title-matching branch October 20, 2026 10:18
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