Bug 22340

Summary: Elasticsearch - sorting fields should have a fallback mechanism
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 - low CC: andreas.jonsson, marjorie.barry-vila
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18827
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Nick Clemens (kidclamp) 2019-02-14 15:41:35 UTC
As an example

264 and 260 should be sortable for publisher

Some records will have one, some will have both, it should eb configurable which to use and that we should not leave the sort field empty if one field is missing
Comment 1 Andreas Jonsson 2024-02-19 16:08:50 UTC
In the field mappings of the search engine configuration there could be an integer option "sort fallback order".  So, when indexing, the sort field is filled with the values corresponding to the mappings with "sort fallback order" = n for the smallest n where the corresponding fields are nonempty.