Summary: | 2nd sorting level of titles in results lists should be configurable | ||
---|---|---|---|
Product: | Koha | Reporter: | Anke Bruns <anke.bruns> |
Component: | Searching - Zebra | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | claes.eriksson, dcook |
Version: | Main | ||
Hardware: | All | ||
OS: | Linux | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Anke Bruns
2023-03-03 11:57:17 UTC
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? (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. |