-
Notifications
You must be signed in to change notification settings - Fork 40
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
Editoast: add search endpoint #2901
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #2901 +/- ##
============================================
+ Coverage 38.67% 39.41% +0.73%
Complexity 1709 1709
============================================
Files 603 611 +8
Lines 18749 19199 +450
Branches 2511 2511
============================================
+ Hits 7252 7567 +315
- Misses 11091 11226 +135
Partials 406 406
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
19361b5
to
5ce3eff
Compare
59c1476
to
ac31e2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great ! few things on doc :)
e521a80
to
6bf7a4f
Compare
2c8932d
to
6f46063
Compare
Uses Full Text Search and pg_trgm Postgres extensions.
78c6c3b
to
565f9ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has improved a lot ! 🚀
3bd61f0
to
c7dd788
Compare
94dcfd9
to
7af3c4a
Compare
editoast:search: fixes sql query binding editoast:search: add unsafely interpolated data validation editoast:search: remove pointless generic parameter of QueryEvalEnv api:search: add GiST index support editoast:search: add some high-level documentation editoast:search: clippy editoast:search: add query validation using editoast.yml + dyn response editoast:search: ensure the query produces a valid WHERE clause editoast:search: move pagination in url parameters editoast:search: fix behavior for null values editoast:search: return OP's geographic and schematic as GeoJSON editoast:search: fix migration dependencies editoast:search: fix init_db.sql formatting editoast:search: clippy editoast:search: add impl ApiErrors for search errors editoast:search: set endpoint to /search editoast:search: smarter text processing + qualified column names * Use of FTS text processing features & unaccent extension to make search queries more permissive: - accents are replaced to their corresponding base letters (é => e, Œ => OE, ...) - ignores irrelevant characters (apostrophes, signs, line breaks, etc...) - lexeme ordering to match compound nouns without specifying all their parts & allow 'holes' * Column names are now qualified by the name of the search table to dismiss eventual ambiguities with joint tables
18eec2c
to
5e953fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GG 🎉
5e953fa
to
7e13263
Compare
Adds the
/search?<page>&<page_size>
endpoint.Example payload:
The endpoint is generic enough so that new types of objects can be searched without modifying the route. For example, when we'll add signals into the search engine, we will
create a table named
osrd_search_signal
with some columns (e.g.: "label", "aspect", etc.). Then we'll updatesearch.yml
like so:We will then be able to query the route like this without changing the route's logic:
Only implemented for operational points for now.
See also #3002
Fixes #1625, fixes #1635