[Koha-bugs] [Bug 29632] Callnumber sorting is incorrect in Elasticsearch
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Aug 26 15:02:36 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29632
--- Comment #18 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 139827
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139827&action=edit
Bug 29632: [21.11.X] Don't sort cn-sort numerically
When defining our sort fields in we defined all as 'numeric'
For other string containing numbers this is likely correct, however,
for callnumbers it is not. e.g. E45 should sort before E7
This patch adds a new 'callnumber' type and deifnes this for cn-sort and
adds to the field maping a sort without numeric set
To test:
0 - Be using ES with Koha
1 - On records with single item, add callnumbers:
VA65 E7 R63 1984
VA65 E7 T35 1990
VA65 E45 R67 1985
2 - Add public note 'shrimp' or something to make them easily searchable as a
group
3 - Search for 'shrimp', sort by callnumber
4 - Note E45 comes last, it should come first
5 - Apply patch
6 - Reset ES mappings
7 - Reindex ES
8 - Repeat search
9 - Sorting should be correct when set to callnumber
Signed-off-by: David Nind <david at davidnind.com>
Signed-off-by: Michal Urban <michalurban177 at gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Bug 29632: Unit tests
This patch adds unit tests, as well as changing existing test to use a mock
and read the data as passed in tests, rather than relying on what exists in
the DB
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Bug 29632: (QA follow-up) Add ENUM value to kohastructure.sql :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Bug 29632: (QA follow-up) Fix COMMENT discrepancy on upgrade
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list