[Koha-bugs] [Bug 33125] 2nd sorting level of titles in results lists should be configurable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 6 00:38:45 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33125

--- Comment #2 from David Cook <dcook at prosentient.com.au> ---
(In reply to Katrin Fischer from comment #1)
> David, adding you as our Zebra expert. I have been looking into turning the
> biblionumber sorting around some while ago but never got somehwere with it
> (or figured out where that is set). Do you know how/where the second
> criteria for sorting comes to be and if it could be reversed?

By default, Zebra sorts by internal record number ascending. We use the
biblionumber as Zebra's internal record number, so that's why that gets used
for that second level sorting.

In C4::Search::getRecords(), we define a sort spec which gets handed to the
"sort" method of ZOOM::ResultSet. 

That sort spec originates from either the "sort_by" parameter in the URL or
OPACdefaultSortField and OPACdefaultSortOrder sysprefs (this is set up in
opac-search.pl or the staff interface search script). 

You can play with this using URLs like the following:

http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=kw&q=test&sort_by=author_az&sort_by=title_za

http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=kw&q=test&sort_by=author_az&sort_by=title_az

--

So a 2nd system preference could be used and/or a second level search box could
be added to the results. There's certainly options there, and it wouldn't
require too big of a patch to introduce.

It's probably not something I'd personally work on, but I could review someone
else's work on it.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list