Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

front: fix some trigrams are not recognized #10729

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

clarani
Copy link
Contributor

@clarani clarani commented Feb 7, 2025

closes #10668

Since the search endpoint response is paginated, when the user searches a short string, the search endpoint will return some of the operational points which match either the trigram or the name. As the search endpoint response is not ordered by trigram first, we could miss some responses, and especially the operational points matching by trigram.

Now, if the user searches a short string, we will first get all the operational points matching the trigram and then the ones matching the name. This way, we won't miss the reponse by trigram anymore.

Since the search endpoint response is paginated, when the user searches a short string, the search endpoint will return
some of the operational points which match either the trigram or the name. As the search endpoint response is not ordered by trigram
first, we could miss some responses, and especially the operational points corresponding by trigram.

Now, if the user searches a short string, we will first get all the operational points matching the trigram and then the ones matching the name.
This way, we won't miss the reponse by trigram anymore.

Signed-off-by: Clara Ni <[email protected]>
@clarani clarani marked this pull request as ready for review February 7, 2025 17:12
@clarani clarani requested a review from a team as a code owner February 7, 2025 17:12
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Feb 7, 2025
@clarani clarani requested review from emersion, flomonster, theocrsb and SharglutDev and removed request for emersion February 7, 2025 17:12
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.93%. Comparing base (7b9373d) to head (82f0aac).
Report is 15 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #10729   +/-   ##
=======================================
  Coverage   81.93%   81.93%           
=======================================
  Files        1079     1079           
  Lines      107550   107576   +26     
  Branches      734      734           
=======================================
+ Hits        88116    88139   +23     
- Misses      19394    19397    +3     
  Partials       40       40           
Flag Coverage Δ
editoast 74.38% <ø> (-0.01%) ⬇️
front 89.41% <100.00%> (+<0.01%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 88.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@theocrsb theocrsb left a comment

Choose a reason for hiding this comment

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

LGTM and tested

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Lgtm and tested, thank you !

@clarani clarani enabled auto-merge February 10, 2025 15:49
@clarani clarani requested a review from emersion February 10, 2025 15:49
@clarani clarani added this pull request to the merge queue Feb 10, 2025
Merged via the queue into dev with commit 2b315fd Feb 10, 2025
27 checks passed
@clarani clarani deleted the cni/10668-trigrams-not-recognized branch February 10, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some trigrams aren't recognized
6 participants