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, orListElements
handles thetop_level_type
of the corpus (note: this is not required forListProcessElements
as this endpoint does hot handletop_level
filter) - A SQL optimization for elements with no path
Edited by Valentin Rigal