Module sort

Module sort 

Source
Expand description

Result sorting with selection preservation across sort modes.

Implements cache-based O(n) reordering for sort mode switching between cacheable modes. BestMatches mode is query-dependent and always performs full O(n log n) sort.

Functionsยง

invalidate_sort_caches
What: Invalidate all sort caches.
sort_results_preserve_selection
What: Apply the currently selected sorting mode to app.results in-place.