curationexperts / cypripedium

A Hyrax 3 application for the Federal Reserve Bank of Minneapolis
2 stars 3 forks source link

Fix custom sort order on Collection pages #583

Closed mark-dce closed 7 months ago

mark-dce commented 7 months ago

ISSUE When a user selected a custom sort order on Collecion landing pages, member items would be always be shown in the same apparently random order regardless of the sort selection.

DIAGNOSIS At some point, Hyrax added an override to the default sort order processor that attempted to sort by title_si when no specific query was provided. The collection landing page uses a filter rather than a query to scope the member items, so the sort order was being set to title_si asc; however, there is no title_si index so the results were being returned in an apparently random order.

SOLUTION Remove the Hyrax code attempting to sort by title so that the application falls back to the base search builder implementation which correctly includes any user specified sort order.

BEFORE

image

AFTER

image