]> git.koha-community.org Git - koha.git/commit
Bug 12478: Display facet terms ordered by number of occurrences
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Oct 2015 09:45:32 +0000 (10:45 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 26 Apr 2016 20:20:12 +0000 (20:20 +0000)
commit8d042911532c19e8a74b42cb0f57f3099fc2e126
tree91f89e5dbfc77c3c84b6f4b332aaad7bcfd25b20
parenta792e847199b26368fa34ada8b76bc3dfbee7f9a
Bug 12478: Display facet terms ordered by number of occurrences

By default ES returns the facet terms ordered by most used, which makes
sense.

This patch removes resort done in the scripts (catalogue/search.pl and
opac/opac-search.pl) and moves it to the module.

For Zebra it's now done in C4::Search::getRecords, and there is no
change to expect (still alphabetically).

On the Elastic search side, we could imagine to let the library define
the order of the facets. The facet terms are now sorted by most used.

To test easily this change, turn on the displayFacetCount pref.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
C4/Search.pm
Koha/SearchEngine/Elasticsearch/Search.pm
catalogue/search.pl
opac/opac-search.pl