From 83b30bd6222e0f809e911f7907c40594d082998e Mon Sep 17 00:00:00 2001 From: Sarah Proctor Date: Tue, 17 Sep 2024 15:03:23 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Sort=20by:=20Published=20Date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit pulls in an update to Hyku that fixes a bug when sorting by title, author, and created date (published date). The Hyku indexing moves from `CollectionResource` to `CollectionResourceIndexer`. Ref: - https://github.com/scientist-softserv/adventist_knapsack/issues/185 --- app/controllers/catalog_controller_decorator.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/catalog_controller_decorator.rb b/app/controllers/catalog_controller_decorator.rb index 3ef21828..853d9911 100644 --- a/app/controllers/catalog_controller_decorator.rb +++ b/app/controllers/catalog_controller_decorator.rb @@ -115,12 +115,12 @@ def self.uploaded_field config.add_sort_field "score desc, #{uploaded_field} desc", label: "Relevance" # TODO: replace CatalogController.title_field to return 'title_ssi' - config.add_sort_field "title_ssi asc", label: "Title" + config.add_sort_field "title_ssim asc", label: "Title" # TODO: replace CatalogController.creator_field to return 'creator_ssi' - config.add_sort_field "creator_ssi asc", label: "Author" + config.add_sort_field "creator_ssim asc", label: "Author" # TODO: replace CatalogController.created_field to return 'created_ssi' - config.add_sort_field "created_ssi asc", label: "Published Date (Ascending)" - config.add_sort_field "created_ssi desc", label: "Published Date (Descending)" + config.add_sort_field "#{CatalogController.created_field} asc", label: "Published Date (Ascending)" + config.add_sort_field "#{CatalogController.created_field} desc", label: "Published Date (Descending)" config.add_sort_field "#{CatalogController.modified_field} asc", label: "Upload Date (Ascending)" config.add_sort_field "#{CatalogController.modified_field} desc", label: "Upload Date (Descending)" end