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

Search on train_schedule table #9124

Closed
EthanPERRUZZA opened this issue Oct 1, 2024 · 2 comments
Closed

Search on train_schedule table #9124

EthanPERRUZZA opened this issue Oct 1, 2024 · 2 comments
Assignees

Comments

@EthanPERRUZZA
Copy link
Contributor

EthanPERRUZZA commented Oct 1, 2024

Issue:

Endpoint: /search

Objective: Add a new object to the search functionality. Currently, we can search on items like rolling stock, etc. The new object to add is: train_schedule.


Things to Know

  • Software for testing requests easily: Postman works well for testing.
  • You can import from OpenAPI.
  • There's an environment system where you can define variables for testing in local/dev environments easily.
  • page and page-size: These are pagination options commonly found on websites, but they are already set up, so no need to worry about them.
  • To test, I can make a request and check the network tab.
  • Requests are done in Reverse Polish Notation.

Search AST Language

  • like: for regex-style searches.
  • =: for exact word matching.
  • search: for smart search (case and accent insensitive).

TODOs

  1. Understand what's in train_schedule: Refer to the SQL table and docs here: Train Schedule Documentation.

  2. Check if the table is indexed: Ensure the train_schedule table is indexed (in SQL) by name, and create the index if necessary.

  3. Define search parameters and results:

    • Declare which parameters we can search by.
    • Specify what the search will return.

Search Declaration

  • The table name is train_schedule, no need for a join.
  • Define the columns available for search (e.g., name).
  • The structure underneath should represent the search results (ideally almost everything).

Other Considerations

  • Make sure we can search by timetable_id as well.
  • There's a timetable table and a train_schedule table, linked by timetable_id (primary key, which we don’t need to focus on, but it should be returned).
  • There may be a test timetable, and we need to query the correct one.

Out of Scope

  • No new tables.
  • No migration needed.
  • No need to handle fuzzy search.

Acceptance Criteria

  • At a minimum, we should be able to search by name.
@EthanPERRUZZA EthanPERRUZZA changed the title Recherche de sillons liés 1/2 back Search on train_schedule table Oct 3, 2024
@celine-sncf celine-sncf reopened this Oct 11, 2024
@celine-sncf
Copy link

@flomonster should we keep this issue open to add the date filtering? (or open another front issue ?)

@flomonster
Copy link
Contributor

should we keep this issue open to add the date filtering? (or open another front issue ?)

No, we decided that the date filtering should be done by the frontend for now.

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

No branches or pull requests

3 participants