Bug 28826: Add FacetOrder system preference
authorNick Clemens <nick@bywatersolutions.com>
Fri, 6 Aug 2021 18:50:35 +0000 (18:50 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 29 Sep 2021 09:34:21 +0000 (11:34 +0200)
commitbc67449a4626d10f1e2860d6893112c5b33b45ce
treecb2713bf03d13b777f7965f474636d87f6e51f2c
parent2ae5204bfe0f46b37ec65255c65e901d9a7289a6
Bug 28826: Add FacetOrder system preference

This bug adds a system preference to control ordering of facets and
adds the control to both Zebra and Elasticsearch

To test:
1 - Have a koha that can use both Zebra and ES
2 - Set 'displayFacetCount' to true
3 - Search in ES and Zebra
4 - Note facets in Zebra sorted alphabetically, ES by usage
5 - Apply patch, updatedatabase
6 - Search in ES and Zebra, facets are alphabetically sorted in both
7 - Find new syspref FacetOrder and set to 'by usage'
8 - Search in both engines, facets sorted by usage

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Search.pm
Koha/SearchEngine/Elasticsearch/Search.pm
installer/data/mysql/atomicupdate/bug_28826_add_FacetSort_syspref.perl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref