[Koha-devel] A patch for sorting by call_number in ES

Fridolin SOMERS fridolin.somers at biblibre.com
Thu Jan 21 09:46:16 CET 2021


Oh indeed.

I think its what is in :
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26051

Best regards

Le 20/01/2021 à 23:51, Zeno Tajoli a écrit :
> Hi to all,
> 
> in default ES setup sort by call_number  is not working.
> Inside Koha/SearchEngine/Elasticsearch/QueryBuilder.pm, routine 
> _convert_sort_fields there is this fix convection:
> 
> call_number => 'local-classification',
> 
> 'call_number' is the string used in the search abstraction level for 
> index used for sort with call numbers
> 
> 'local-classification' is the name of the ES index selected for sorting 
> by call numbers
> 
> I think that the selection of 'local-classification' as standard sort 
> index for call numbers is not a good idea.
> I think is better to use the ES index 'cn-sort' that is connect with 
> 952$6 [MARC21] and 995$s[Unimarc] and the mysql field items.cn_sort.
> items.cn_sort is the normalized form of the call number used for sorting.
> 
> I can write a patch to connect cn-sort with 'call_number' and fix also 
> default setup of admin/searchengine/elasticsearch/mappings.yaml, 
> inserting 'cn-sort' as sortable.
> 
> What do you think ?
> 
> Cheers
> Zeno Tajoli
> 

-- 
Fridolin SOMERS <fridolin.somers at biblibre.com>
Software and system maintainer 🦄
BibLibre, France


More information about the Koha-devel mailing list