Skip to content

Speed up top level elements list

Followup of #280 (closed).
Some corpora causes a 502 when trying to list top level elements, which prevent navigating on said corpus.

Two approaches are possible :

  • A nullable top_level_type for a corpus. This allow two options, either the frontend know to list a certain type of element from the corpus and list this element first, or ListElements handles the top_level_type of the corpus (note: this is not required for ListProcessElements as this endpoint does hot handle top_level filter)
  • A SQL optimization for elements with no path
Edited by Valentin Rigal