In C4::AuthoritiesMarc::SearchAuthorities : Search can be sorted by authid ascending or descending. This sort is integrated in PQF query with attribute 7. The bug is that default sorting with attribute 7 is alphabetic. To use a numerical sort, attribute 7 must be combined with attribute 4=109. See http://www.indexdata.com/zebra/doc/querymodel-zebra.html (doc of attribute 7). The sort by authid is use by Linker, but i provide a test plan on authorities search page, it is more easy : Test plan : ----------- - perform an authority search sorted by "Heading A-Z", for example on "Paul". - you get and URL ending with : cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=mainentry&and_or=and&operator=contains&value=paul&orderby=HeadingAsc - edit this URL to replace "HeadingAsc" by "AuthidAsc" or "AuthidDsc" - refresh page - you get a table of authorities - look at "Details" of each line, it is a hyperlink ending with authid of authority Without patch, you get an odd order (order does not depend on authid length). With patch, you get a correct numerical order.
Created attachment 13572 [details] [review] Proposed patch Proposed patch. Also adds numerical indexing (:n) of Local-Number in Zebra config. To test : - apply patch - reindex all Zebra authorities database - test
Will be testing this further. Came across some funny effects while paging through a larger result set.
(In reply to comment #2) > Came across some funny effects while paging > through a larger result set. Submitted this under bug 9132.
Created attachment 13633 [details] [review] Signed patch for 9123 Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested with Zebra, marc21, grs1. Discovered that paging through auth search results does no longer work, but that is not related to these changes.
Should you also provide the ability to sort on this authid on the auth search form?
Suggest that QA is done by someone that can also test behavior with dom indexing. Just to make sure ..
(In reply to comment #5) > Should you also provide the ability to sort on this authid on the auth search form? I think so, do you think it can be usefull. Do we create a new enhancement ?
(In reply to comment #7) > I think so, do you think it can be usefull. > Do we create a new enhancement ? Alphabetical order is of course more useful, but if we include this search order, why hide it? You could open a new report for it in order to get this patch get pushed sooner.
> Alphabetical order is of course more useful, but if we include this search order, why hide it? You could open a new report for it in order to get this patch get pushed sooner. Create bug 9150
Created attachment 13817 [details] [review] [SINGED-OFF] Bug 9123: Authorities search ordered by authid does not work Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested with Zebra, marc21, grs1. Discovered that paging through auth search results does no longer work, but that is not related to these changes. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested with Zebra, marc21, dom. All tests pass.
This patch has been pushed to master.
Bugfix pushed to 3.10.x and 3.8.x, will be in 3.10.1 and 3.8.8